PDA

View Full Version : Worksheet Protection Method with UserInterfaceOnly Argument



technicalupload
09-02-2011, 03:13 PM
Private Sub Workbook_Open()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.Protect userinterfaceonly:=True
Next wks
End Sub



While protecting a sheet through code there is a parameter 'UserInterfaceOnly' which if set to True allows any modification on sheet through code only. However, it doesn't allow any direct change in the sheet e.g. if you cannot write anything on the sheet if it is protected with 'UserInterfaceOnly' parameter set to True.

Regards: technicalupload

Admin
09-02-2011, 04:17 PM
Hi,

:cool: