L
Leyton
I have some code that works absolutely fines in Excel 97
but is giving "odd" behaviour in XP.
It's to do with the right click menu on the worksheet
tabs - I'm trying to selectively disable certain aspects
(e.g. view code).
What used to work is:
Application.CommandBars(27).Controls("view code").Enabled
= False
I've tried to work out how to get this menu control using:
For Each ctl In Application.CommandBars("workbook
tabs").Controls
Debug.Print ctl.Caption
Next
But this returns the names of each of the worksheets.
If I do something like:
Application.CommandBars("workbook tabs").ShowPopup
I get a menu with the three worksheet names as a menu.
Hmm Very confused. Anyone know how I can set these
controls to be enabled?
Thanks
Leyton
ps I'd like to keep this working in both Excel 97 and
2002!
but is giving "odd" behaviour in XP.
It's to do with the right click menu on the worksheet
tabs - I'm trying to selectively disable certain aspects
(e.g. view code).
What used to work is:
Application.CommandBars(27).Controls("view code").Enabled
= False
I've tried to work out how to get this menu control using:
For Each ctl In Application.CommandBars("workbook
tabs").Controls
Debug.Print ctl.Caption
Next
But this returns the names of each of the worksheets.
If I do something like:
Application.CommandBars("workbook tabs").ShowPopup
I get a menu with the three worksheet names as a menu.
Hmm Very confused. Anyone know how I can set these
controls to be enabled?
Thanks
Leyton
ps I'd like to keep this working in both Excel 97 and
2002!