Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enabling a menu item
Hallo Forum,
I am hoping someone out there will be able to help me! I have a spreadsheet which needs to have hidden formula. No worrie doing that bit! On the sheet there is some data which the user can sort using button. If the formulas are hidden then the macro behind the button fail because the sheet is protected and the sort option disabled. I would like to add a bit of code to the button (before the sort) t enable the sort option on the sheet and then disable it again (afte the search). Is this possible? TIA, MoonWeaze -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enabling a menu item
Use the following to unprotect the sheet, then re-protect after the sort.
The password is optional, change it to whatever of pass it as a string from your password procedure if you need one. ActiveSheet.Unprotect ("xxxxxx") ' put your sort in here ActiveSheet.Protect Password:="xxxxxx", DrawingObjects:=True, Contents:=True, Scenarios:=True Cheers Nigel "MoonWeazel " wrote in message ... Hallo Forum, I am hoping someone out there will be able to help me! I have a spreadsheet which needs to have hidden formula. No worries doing that bit! On the sheet there is some data which the user can sort using a button. If the formulas are hidden then the macro behind the button fails because the sheet is protected and the sort option disabled. I would like to add a bit of code to the button (before the sort) to enable the sort option on the sheet and then disable it again (after the search). Is this possible? TIA, MoonWeazel --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enabling a menu item
You could put in at the beginning of the macro:
ActiveSheet.UnProtect (your password here) your code ActiveSheet.Protect (your password here -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enabling multiple selections in same cell from dropdown menu | Excel Discussion (Misc queries) | |||
Enabling sub menu items via vba | Excel Worksheet Functions | |||
Enabling shortcut menu | Excel Discussion (Misc queries) | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
re-enabling macro under menu item | Excel Programming |