Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I habe the following code that is called in the workbook open event. I can
run this in Excel 2000 without any problems but when I try to run it at work with Excel 2002 I get an error saying the password is not correct. Debug takes me the first line of the code below. I tried changing to "taylor" but that didn't help. Any help on where I am going wrong would be greatly appreciated. If I set the password without quotes, you can't go to tools-protection and type in the password to unprotect even if you know what it is. I assume this is because the password is set as a variable. Do I have this wrong? Is this where my trouble stems from? Private Sub ProtectAll() Sheet1.Protect Contents:=True, password:=taylor, userinterfaceonly:=True Sheet2.Protect Contents:=True, password:=taylor, userinterfaceonly:=True Sheet3.Protect Contents:=True, password:=taylor, userinterfaceonly:=True Sheet4.Protect Contents:=True, password:=taylor, userinterfaceonly:=True Sheet5.Protect Contents:=True, password:=taylor, userinterfaceonly:=True With Sheet2.Range("b2,c24,c46,c68,c90,c112,c134") .NumberFormat = "m/d/yy" End With With Sheet3.Range("c2,c24,c46,c68,c90") .NumberFormat = "m/d/yy" End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Password protection in macro ( Anybody can view my password in VB | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
Password Protection | Excel Discussion (Misc queries) | |||
PASSWORD PROTECTION | Excel Worksheet Functions | |||
Password Protection | Excel Discussion (Misc queries) |