S
stef
Excel 2002 SP3
Win XP Pro
*Follow-up to: microsoft.public.excel.programming*
Hi,
I have a bug with the line ".EnableSelection = xlUnlockedCells" in this
macro:
Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
With Sheets(n)
.Protect Password:="nosecret"
.EnableSelection = xlUnlockedCells
End With
Next n
Application.ScreenUpdating = True
End Sub
It's always worked in the past and I can't understand what is happening now.
Be easy on me as I am a newbie at XL macros/VBA....
Win XP Pro
*Follow-up to: microsoft.public.excel.programming*
Hi,
I have a bug with the line ".EnableSelection = xlUnlockedCells" in this
macro:
Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
With Sheets(n)
.Protect Password:="nosecret"
.EnableSelection = xlUnlockedCells
End With
Next n
Application.ScreenUpdating = True
End Sub
It's always worked in the past and I can't understand what is happening now.
Be easy on me as I am a newbie at XL macros/VBA....