View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default 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/