Home Not Locking certain cells and enabling font formatting for those cells but not others
Reply: 0

Not Locking certain cells and enabling font formatting for those cells but not others

Sid29
1#
Sid29 Published in 2018-02-14 15:37:38Z

I am trying to lock certain cells in my workbook and to do that I am specifying the cells that I don't want it to lock and then protecting workbook.

This is my code,

 MyWorkbook.Sheets(l).Range("A" & HeaderRow + 1 & ":B" & lastrow).Locked = False
  MyWorkbook.Sheets(l).Protect Password:="201&", DrawingObjects:=True, Contents:=True, Scenarios:=True _
                , AllowFormattingCells:=True, AllowFiltering:=True, AllowFormattingColumns:=False

This code allows the end user to change the fonts of the cells that I have locked. But I want to allow cell formatting only where the cell editing is allowed.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300562 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO