Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2006, 10:12 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
Default Sheet Tab

Hi,

Excel 2003.

Within my code I have restricted the toolbar options that a user can access (i.e. for Menu Option 'Edit'\'Delete Sheet'):

VBA:
Code:
Set myCmd = CommandBars("Worksheet menu bar").Controls("Edit")
myCmd.Controls("Delete Sheet").Enabled = False
I have found that users can still delete the sheet if they 'right-click' on a specfic sheet tab.

I don't wish to hide the Worksheet Tabs, I just want to prevent the Users from deleting a specific sheet.
After immobilising the 'Edit'/'Delete Sheet' Menu Option, they can still 'right-click' on the tab - i.e. Insert, Delete or Rename the sheet.

How do disable these options within VBA? Or is there a Menu setting that I can be set to Enabled = False?

Thanks in advance,


Neal

A Northern Soul
__________________
Neal

A Northern Soul





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable a tab on a tab control. dbradley VB.NET 6 April 14th, 2011 10:04 AM
Open Workbook,Copy Sheet,Move Sheet, Close/Save ptrussell2009 Excel VBA 0 June 13th, 2008 02:28 PM
access function in data sheet(another sheet) jani Excel VBA 1 May 21st, 2008 07:15 PM
Display Tab Name on Sheet echovue Excel VBA 2 January 14th, 2005 10:45 AM
If Sheet Is Selected MattLeek Excel VBA 4 March 26th, 2004 05:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.