Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 95/2000 Protect worksheet fails

Status
Not open for further replies.

mpopnoe

Programmer
Feb 28, 2002
47
US
When trying to unprotect a file that was protected in Excel 95 in Excel 2000 I get an error 1004 "Password supplied is incorrect, check CAPS lock .....". I know Excel 95 is 16 bit and 2000 is 32, so are they reading the same password differently??

I made a macro in 95 that seemed to be working for both versions (to protect and unprotect a sheet). Here is the unprotect procedure (the reason I turned off alerts is because the code seemed to be working despite the error message, but now It seems to not be working):

Public Sub UnProtectSheet()
'UNPROTECT THE SHEET BY USING THE PASSWORD
Application.DisplayAlerts = False
ActiveWorkbook.ActiveSheet.Unprotect "password"
Application.DisplayAlerts = True
End Sub

I simply need one macro that will protect/unprotect sheets whether the file is brought up in 2000 or in 95. Can anyone help me???

 
I have had password problems between Excel 2000 and 97. I suggest that you unlock in 95 and save. Skip,
 
The problem is some users use Excel 95 and some use Excel 2000, not everyone is converting yet. Plus, these files get locked and unlocked multiply times during use and if I lock it in 2000 the 95 users won't be able to use the file. I may have to make 2 copies of every file in order for this to work. Does anyone have a fix for the password problems between 95 and 2000? Or know why the problem exists???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top