Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enabling multiple selections in same cell from dropdown menu Jimmy Excel Discussion (Misc queries) 0 January 2nd 08 05:55 PM
Enabling sub menu items via vba Dan Neely Excel Worksheet Functions 0 July 11th 05 04:48 PM
Enabling shortcut menu Slypaw Excel Discussion (Misc queries) 3 March 16th 05 12:37 AM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
re-enabling macro under menu item jerry h Excel Programming 1 April 18th 04 12:14 AM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"