ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Allowing formatting in lower versions of EXCEL (https://www.excelbanter.com/excel-programming/274765-re-allowing-formatting-lower-versions-excel.html)

Tom Ogilvy

Allowing formatting in lower versions of EXCEL
 
ActiveSheet.Protect Password:="password", _
DrawingObjects:=True, Contents:=True, Scenarios:=True, _
UserInterfaceOnly:=False

of course formatting and sorting won't be allowed.


--
Regards,
Tom Ogilvy


"Stacy Haskins" wrote in message
...
How can I make the following code work on verisons of
Excel lower than 2002?:

ActiveSheet.Protect Password:="password",
DrawingObjects:=True, Contents:=True, Scenarios:=True,
UserInterfaceOnly:=False, AllowFormattingCells:=True,
AllowFormattingColumns:=True, AllowFormattingRows:=True,
AllowInsertingColumns:=False, AllowInsertingRows:=False,
AllowInsertingHyperlinks:=False,
AllowDeletingColumns:=False, AllowDeletingRows:=False,
AllowSorting:=True, AllowFiltering:=False,
AllowUsingPivotTables:=False




Tom Ogilvy

Allowing formatting in lower versions of EXCEL
 
To the best of my knowledge, you can't in earlier versions. Perhaps you
would have to provide the user with a button and get the users preferences,
then in code, unprotect the sheet and perform the action, then reprotect the
sheet.



--
Regards,
Tom Ogilvy

"Stacy Haskins" wrote in message
...
That was my objective. How can I allow formatting and
sorting on versions < 2002 and still be protected?
Stacy
-----Original Message-----
ActiveSheet.Protect Password:="password", _
DrawingObjects:=True, Contents:=True, Scenarios:=True, _
UserInterfaceOnly:=False

of course formatting and sorting won't be allowed.


--
Regards,
Tom Ogilvy


"Stacy Haskins" wrote in

message
...
How can I make the following code work on verisons of
Excel lower than 2002?:

ActiveSheet.Protect Password:="password",
DrawingObjects:=True, Contents:=True, Scenarios:=True,
UserInterfaceOnly:=False, AllowFormattingCells:=True,
AllowFormattingColumns:=True,

AllowFormattingRows:=True,
AllowInsertingColumns:=False,

AllowInsertingRows:=False,
AllowInsertingHyperlinks:=False,
AllowDeletingColumns:=False, AllowDeletingRows:=False,
AllowSorting:=True, AllowFiltering:=False,
AllowUsingPivotTables:=False



.





All times are GMT +1. The time now is 12:29 PM.

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