Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Neil,
Change ActiveWorksheet to ActiveSheet -- sb "Neil Warwick" wrote in message ... Is there a way that I can remove and add protection to the worksheet in VBA on Excel 2000 / XP? According to the online help I can use the commands:- ActiveWorksheet.Protect and ActiveWorksheet.Unprotect I have tried to use them in the format shown below, but they don't seem to work correctly. ActiveWorksheet.Unprotect "frodo" ActiveWorksheet.Protect Password:="frodo" I'm pretty new to all this VBA stuff so any help would be appreciated (Can anyone recommend a good book?) Thanks Neil |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cheers Steve,
How much of a dope do I feel! Neil -----Original Message----- Neil, Change ActiveWorksheet to ActiveSheet -- sb "Neil Warwick" wrote in message ... Is there a way that I can remove and add protection to the worksheet in VBA on Excel 2000 / XP? According to the online help I can use the commands:- ActiveWorksheet.Protect and ActiveWorksheet.Unprotect I have tried to use them in the format shown below, but they don't seem to work correctly. ActiveWorksheet.Unprotect "frodo" ActiveWorksheet.Protect Password:="frodo" I'm pretty new to all this VBA stuff so any help would be appreciated (Can anyone recommend a good book?) Thanks Neil . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Neil,
Not a dope! Just crazy Excel Syntax... Suggest you force Option Explicit at the top of your modules and do a compile before running your code. You'll catch these a lot faster... (even though the messages you'll get won't be that enlightening.) To force Option Explicit (on all NEW macros). Go to the VBE Tools Options Editor Require Variable Delcaration -- sb wrote in message ... Cheers Steve, How much of a dope do I feel! Neil -----Original Message----- Neil, Change ActiveWorksheet to ActiveSheet -- sb "Neil Warwick" wrote in message ... Is there a way that I can remove and add protection to the worksheet in VBA on Excel 2000 / XP? According to the online help I can use the commands:- ActiveWorksheet.Protect and ActiveWorksheet.Unprotect I have tried to use them in the format shown below, but they don't seem to work correctly. ActiveWorksheet.Unprotect "frodo" ActiveWorksheet.Protect Password:="frodo" I'm pretty new to all this VBA stuff so any help would be appreciated (Can anyone recommend a good book?) Thanks Neil . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
removing password protection | Excel Discussion (Misc queries) | |||
Applying Protection To Multiple Sheets | New Users to Excel | |||
Removing Module Protection Programatically | Excel Discussion (Misc queries) | |||
Removing protection from excel worksheets | Excel Worksheet Functions | |||
Applying protection to an Excel Expense Report | Excel Programming |