• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

use code to allow changing row height and column width in protected worksheet

niklas

New Member
Hi again,
I have a little macro that allows for some additional flexibility when a worksheet is protected. If I would like the user to be able to change row height and column width I cannot figure out what lines I need to insert. probably something like "enable columnwidth = true" but it does not quite work

Thanks Niklas

Code:
Sub auto_open()
     With Worksheets("OtherFcst")
         .protect Password:="sonosfpa", userinterfaceonly:=True
         .EnableOutlining = True
         '.EnableAutoFilter = True
         'If .FilterMode Then
         '   .ShowAllData
         'End If
     End With
End Sub
 
Last edited by a moderator:
As part of your .Protect line add the following

AllowFormattingColumns:=False, AllowFormattingRows:=False
 
Back
Top