ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protect Error Excel97 (https://www.excelbanter.com/excel-programming/293469-protect-error-excel97.html)

Aksel Børve

Protect Error Excel97
 
I have made my Macros in Excel 2000, but when people use the Worksheets
with Excel 97, they get an Error Message. How can I wrie the
Protect/Unprotect in my Macros
This is how it's now
Sheets("MPA").Unprotect
'or
ActiveSheet.Unprotect
'and
ActiveSheet.Protect DrawingObjects:=True, _
Contents:=True, _
Scenarios:=False

I also have a pasword to protect the Macros

Any suggestion?
Thanks
Aksel Børve.



Tom Ogilvy

Protect Error Excel97
 
If you are running this code from a commandbutton, change the
takefocusonclick property of the commandbutton to False.

--
Regards,
Tom Ogilvy

"Aksel Børve" wrote in message
...
I have made my Macros in Excel 2000, but when people use the Worksheets
with Excel 97, they get an Error Message. How can I wrie the
Protect/Unprotect in my Macros
This is how it's now
Sheets("MPA").Unprotect
'or
ActiveSheet.Unprotect
'and
ActiveSheet.Protect DrawingObjects:=True, _
Contents:=True, _
Scenarios:=False

I also have a pasword to protect the Macros

Any suggestion?
Thanks
Aksel Børve.






All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com