LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Disable "Hyperlink" menu item

Greetings

The following piece of code works fine:

CommandBars("Worksheet Menu Bar").Controls("File").Controls("Save
&As...").Enabled = False

However, if I change it to try and disable the Hyperlink menu item, it
will not work:

CommandBars("Worksheet Menu
Bar").Controls("Insert").Controls("Hyperl&ink...). Enabled = False

I then attempted to do it by brute force with equal lack of success:

For Each m1 In Application.CommandBars(1).Controls
For Each m2 In m1.Controls
If m2.Caption = "Hyperl&ink..." Then
m2.Enabled = False
End If
Next m2
Next m1

Can anyone please explain to me why these methods fail to disable the
Hyperlink menu item, and if there is a way to do it?

Thanks and regards

Murray

 
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
Can't Disable the "Insert - Rows" menu option in Excel using VBA m PK9 Excel Programming 6 December 31st 05 09:01 AM
Custom Menu Item Randomly "Checked" durex[_14_] Excel Programming 2 December 12th 05 01:51 AM
Excel should have a "Change Case..." menu Item like Word!! Octapusgardenintheshade Excel Discussion (Misc queries) 1 November 22nd 05 06:32 PM
Menu Item Action Changes with "User" accessing file windsurferLA Excel Programming 1 June 15th 05 08:00 PM
How to disable the "Insert Copied Cells" context menu item Coen Excel Programming 21 February 9th 05 09:37 PM


All times are GMT +1. The time now is 02:03 PM.

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"