Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default disable tab function on sheet tab

Hi,

Please help me on this question.

When I right click on the sheet tab, I can rename the sheet name.
How do I disable function by using VBA?

Thanks a lot.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default disable tab function on sheet tab

You could remove the "rename" from the right-click menu using VBA but what about
the double-click to rename?

Maybe easier to go to ToolsProtection and Protect the workbook?


Gord Dibben MS Excel MVP

On Thu, 17 Apr 2008 07:02:36 -0700 (PDT), johnny wrote:

Hi,

Please help me on this question.

When I right click on the sheet tab, I can rename the sheet name.
How do I disable function by using VBA?

Thanks a lot.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default disable tab function on sheet tab

On Apr 17, 11:56 am, Gord Dibben <gorddibbATshawDOTca wrote:
You could remove the "rename" from the right-click menu using VBA but what about
the double-click to rename?

Maybe easier to go to ToolsProtection and Protect the workbook?

Gord Dibben MS Excel MVP

On Thu, 17 Apr 2008 07:02:36 -0700 wrote:
Hi,


Please help me on this question.


When I right click on the sheet tab, I can rename the sheet name.
How do I disable function by using VBA?


Thanks a lot.


Thanks for your help.
The right click menu seems apply only within the sheet, but does not
apply when I right click on the sheet tab, try to rename it.
I just want to disable on one sheet but not others so I cannot use the
protection on the workbook.

I got something from other link :
Application.CommandBars("Ply").FindControl(ID:=847 ).Enabled = False

How do I find out which control correspond to which ID, like 847 is
for insert etc.

Other suggestions, thanks.








  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default disable tab function on sheet tab

Make it sheet activate and deactivate event code to disable for that sheet then
enable when you switch to other sheet.

Here is a list of the Ply Control ID's

Parent: Control Name: ID#:
Ply &Ungroup Sheets 1968
Ply &Insert... 945
Ply &Delete 847
Ply &Rename 889
Ply &Move or Copy... 848
Ply &Select All Sheets 946
Ply &Tab Color... 5747
Ply &View Code 1561

Private Sub Worksheet_Activate()
Application.CommandBars("Ply").FindControl(ID:=889 ).Enabled = False
End Sub

Private Sub Worksheet_Deactivate()
Application.CommandBars("Ply").FindControl(ID:=889 ).Enabled = True
End Sub

For much more on Commandbars........ID's etc. down;oad Ole Erlandson's
Commandbars Tools.

http://www.erlandsendata.no/english/...oadcommandbars


Gord


On Thu, 17 Apr 2008 09:09:55 -0700 (PDT), johnny wrote:

On Apr 17, 11:56 am, Gord Dibben <gorddibbATshawDOTca wrote:
You could remove the "rename" from the right-click menu using VBA but what about
the double-click to rename?

Maybe easier to go to ToolsProtection and Protect the workbook?

Gord Dibben MS Excel MVP

On Thu, 17 Apr 2008 07:02:36 -0700 wrote:
Hi,


Please help me on this question.


When I right click on the sheet tab, I can rename the sheet name.
How do I disable function by using VBA?


Thanks a lot.


Thanks for your help.
The right click menu seems apply only within the sheet, but does not
apply when I right click on the sheet tab, try to rename it.
I just want to disable on one sheet but not others so I cannot use the
protection on the workbook.

I got something from other link :
Application.CommandBars("Ply").FindControl(ID:=84 7 ).Enabled = False

How do I find out which control correspond to which ID, like 847 is
for insert etc.

Other suggestions, thanks.








  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default disable tab function on sheet tab

On Apr 17, 6:59 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Make it sheet activate and deactivate event code to disable for that sheet then
enable when you switch to other sheet.

Here is a list of the Ply Control ID's

Parent: Control Name: ID#:
Ply &Ungroup Sheets 1968
Ply &Insert... 945
Ply &Delete 847
Ply &Rename 889
Ply &Move or Copy... 848
Ply &Select All Sheets 946
Ply &Tab Color... 5747
Ply &View Code 1561

Private Sub Worksheet_Activate()
Application.CommandBars("Ply").FindControl(ID:=889 ).Enabled = False
End Sub

Private Sub Worksheet_Deactivate()
Application.CommandBars("Ply").FindControl(ID:=889 ).Enabled = True
End Sub

For much more on Commandbars........ID's etc. down;oad Ole Erlandson's
Commandbars Tools.

http://www.erlandsendata.no/english/...oadcommandbars

Gord

On Thu, 17 Apr 2008 09:09:55 -0700 wrote:
On Apr 17, 11:56 am, Gord Dibben <gorddibbATshawDOTca wrote:
You could remove the "rename" from the right-click menu using VBA but what about
the double-click to rename?


Maybe easier to go to ToolsProtection and Protect the workbook?


Gord Dibben MS Excel MVP


On Thu, 17 Apr 2008 07:02:36 -0700 wrote:
Hi,


Please help me on this question.


When I right click on the sheet tab, I can rename the sheet name.
How do I disable function by using VBA?


Thanks a lot.


Thanks for your help.
The right click menu seems apply only within the sheet, but does not
apply when I right click on the sheet tab, try to rename it.
I just want to disable on one sheet but not others so I cannot use the
protection on the workbook.


I got something from other link :
Application.CommandBars("Ply").FindControl(ID:=84 7 ).Enabled = False


How do I find out which control correspond to which ID, like 847 is
for insert etc.


Other suggestions, thanks.


Hi Gord,

Thanks a lot for your help.
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
How do I disable save prompt when exiting a sheet? Copter32 Excel Discussion (Misc queries) 7 March 12th 08 04:25 PM
Disable sheet reference check adimar Excel Worksheet Functions 0 February 6th 08 08:02 PM
How to Disable Unhide Sheet menu option contactf Excel Worksheet Functions 8 September 25th 07 07:42 PM
How to disable copy and paste function in a protected sheet Igneshwara reddy[_2_] Setting up and Configuration of Excel 1 March 17th 07 04:08 AM
How can I disable system alerts (deleting a sheet for example)? andriil Excel Discussion (Misc queries) 16 December 17th 05 03:37 PM


All times are GMT +1. The time now is 12:04 AM.

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

About Us

"It's about Microsoft Excel"