Unprotect sheet using a password in a VBA macro

  Berater 10:53 02 Oct 03

ActiveSheet.Unprotect ("pwrd")doesn't work in Excel 97. Microsoft's workaround,

ActiveSheet.Unprotect password:="pword", Contents:=True, _
Scenarios:=False, DrawingObjects:=True, UserInterfaceOnly:=True

also doesn't work.

Microsoft states this has been resolved in Office 2000. Have legit reasons for needing to do it in 97.

Can anyone please help?


  VoG II 16:30 02 Oct 03

This worked for me in Excel 97

ActiveSheet.Unprotect password:="pwrd"

I can't check it now (on XP) but I used it in code I develkoped using Excel 5 and Excel 97.

  Berater 16:44 02 Oct 03

Very much appreciate your taking the trouble to help. Have found a solution: it is to add before the code to unprotect the sheet,

It works find. Thanks again.


This thread is now locked and can not be replied to.

How to watch Windows Event live stream, live blog | Microsoft event live stream: Watch Microsoft…

1995-2015: How technology has changed the world in 20 years

This amazing app turns your iPad Pro into a Cintiq

iPhone 7 Plus review: A superb big-screen phablet, but the price tag's enormous | iPhone 7 Plus…