G
Guest
I used a code for locking some Columns , but I having a problem , when I try
to run the form comes the pop up msg saing I was supost to have something in
line 149 that is the "end function" line. the code is this one:
Set pt = XLsheet.ActiveSheet.Protection
XLsheet.Columns(9).Locked = True
XLsheet.Columns(6).Locked = True
For I = 1 to 6
XLsheet.Columns(I).Locked = False
For X = 7 to 8
XLsheet.Columns(X).Locked = False
pt.AllowDeletingColumns = False
pt.AllowDeletingRows = False
pt.AllowFiltering = False
pt.AllowInsertingColumns = False
pt.AllowInsertingRows = False
pt.Enabled = True
End Function
thanks
to run the form comes the pop up msg saing I was supost to have something in
line 149 that is the "end function" line. the code is this one:
Set pt = XLsheet.ActiveSheet.Protection
XLsheet.Columns(9).Locked = True
XLsheet.Columns(6).Locked = True
For I = 1 to 6
XLsheet.Columns(I).Locked = False
For X = 7 to 8
XLsheet.Columns(X).Locked = False
pt.AllowDeletingColumns = False
pt.AllowDeletingRows = False
pt.AllowFiltering = False
pt.AllowInsertingColumns = False
pt.AllowInsertingRows = False
pt.Enabled = True
End Function
thanks