T
Thor
Hello. Boy, do I need help....
I had to unprotect and protect a worksheet within a macro to get some
code to run. Problem: The protection variables that I originally
assigned when I manually protected the sheet (and before the macro was
run for the first time), such as allow the user to format unlocked
cells, columns, and rows is modified. Is there a way to keep these
protection variables in tact with the macro code?? I'm running excel
2003, but some users will be running 2000.
Worksheets("DOLLARS").Unprotect Password:="HAPPY"
Range("U9:AF9").Select
Selection.EntireColumn.Hidden = True
Range("AG10:AN10").Select
Selection.EntireColumn.Hidden = False
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
Range("B13").Select
Worksheets("DOLLARS").Protect Password:="HAPPY"
End Sub
I appreciate any input.
I had to unprotect and protect a worksheet within a macro to get some
code to run. Problem: The protection variables that I originally
assigned when I manually protected the sheet (and before the macro was
run for the first time), such as allow the user to format unlocked
cells, columns, and rows is modified. Is there a way to keep these
protection variables in tact with the macro code?? I'm running excel
2003, but some users will be running 2000.
Worksheets("DOLLARS").Unprotect Password:="HAPPY"
Range("U9:AF9").Select
Selection.EntireColumn.Hidden = True
Range("AG10:AN10").Select
Selection.EntireColumn.Hidden = False
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
Range("B13").Select
Worksheets("DOLLARS").Protect Password:="HAPPY"
End Sub
I appreciate any input.