Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mary Kathryn
 
Posts: n/a
Default VBA to disable "Delete...." on shortcut menu of worksheet tab?


I have a spreadsheet where I don't want users to be able to delete a
worksheet. How do I code it so that the "Delete..." on the shortcut
menu for the worksheet tabs is disabled? I'm thinking that part of the
code is:

.Controls("Delete...").enabled=False


but can't figure out the rest.

Thanks for any help!


--
Mary Kathryn
------------------------------------------------------------------------
Mary Kathryn's Profile: http://www.excelforum.com/member.php...o&userid=31905
View this thread: http://www.excelforum.com/showthread...hreadid=518725

  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default VBA to disable "Delete...." on shortcut menu of worksheet tab?

Use this

Application.CommandBars("Ply").FindControl(ID:=847 ).Enabled = False

See also
http://www.rondebruin.com/menuid.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mary Kathryn" wrote in message
news:Mary.Kathryn.243n6m_1141398604.0775@excelforu m-nospam.com...

I have a spreadsheet where I don't want users to be able to delete a
worksheet. How do I code it so that the "Delete..." on the shortcut
menu for the worksheet tabs is disabled? I'm thinking that part of the
code is:

Controls("Delete...").enabled=False


but can't figure out the rest.

Thanks for any help!


--
Mary Kathryn
------------------------------------------------------------------------
Mary Kathryn's Profile: http://www.excelforum.com/member.php...o&userid=31905
View this thread: http://www.excelforum.com/showthread...hreadid=518725



  #3   Report Post  
Posted to microsoft.public.excel.misc
Mary Kathryn
 
Posts: n/a
Default VBA to disable "Delete...." on shortcut menu of worksheet tab?


That did the trick! I sure do appreciate your help!


--
Mary Kathryn
------------------------------------------------------------------------
Mary Kathryn's Profile: http://www.excelforum.com/member.php...o&userid=31905
View this thread: http://www.excelforum.com/showthread...hreadid=518725

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default VBA to disable "Delete...." on shortcut menu of worksheet tab?

There's an option to delete sheets under Edit (on the worksheet menubar).

And the user can just drag that tab to another workbook.

Just a warning that there are other ways to delete sheets.

You may want to consider using Tools|Protection|protect workbook and check that
Structure option. The user won't be able to move/delete/insert/rename/copy any
of those worksheets.

Mary Kathryn wrote:

I have a spreadsheet where I don't want users to be able to delete a
worksheet. How do I code it so that the "Delete..." on the shortcut
menu for the worksheet tabs is disabled? I'm thinking that part of the
code is:

Controls("Delete...").enabled=False

but can't figure out the rest.

Thanks for any help!

--
Mary Kathryn
------------------------------------------------------------------------
Mary Kathryn's Profile: http://www.excelforum.com/member.php...o&userid=31905
View this thread: http://www.excelforum.com/showthread...hreadid=518725


--

Dave Peterson
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
One worksheet to calulate different items simultaneously John Excel Worksheet Functions 4 November 28th 05 07:07 PM
How can the right-click shortcut menu in Excel be edited? LynneN Excel Discussion (Misc queries) 10 January 31st 05 11:43 PM
is there a shortcut to move from one worksheet to another, in Exc. twylagirl Excel Discussion (Misc queries) 2 January 6th 05 07:55 PM
Disable menu selection andy Excel Discussion (Misc queries) 3 December 10th 04 10:46 PM
shortcut menu Javed Excel Discussion (Misc queries) 1 December 6th 04 09:28 PM


All times are GMT +1. The time now is 09:26 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"