S
suzetter
I have been experimenting with some code in Excel 2003 to hide
comandbars. Unfortunately somehow I accidentily disabled a few shortcut
menu bars, like the right-click menu bar for the cell, row, column and
worksheet tab
I have thus far been enable to re-enable the right-click shortcut menu
for the cell, row and column, but cannot restore the right-click
shortcut menu for the worksheet tab...the one where you get the options
to Rename, Hide, Unhide etc.
I have tried the following code and all the code works except the one
for the "Sheet"
Code:
--------------------
Sub EnableMenus()
Dim myexcel As Object
Set myexcel = GetObject(, "Excel.Application") 'Point to active excel application
myexcel.CommandBars("Cell").Enabled = True
myexcel.CommandBars("Row").Enabled = True
myexcel.CommandBars("Column").Enabled = True
myexcel.CommandBars("Sheet").Enabled = True
End Sub
--------------------
I even tried to reset all the menubars using the following code and it
still doesn't work
Code:
--------------------
Sub EnableMenus()
Dim myexcel As Object
myexcel.MenuBars("worksheet").Reset
End Sub
--------------------
Any assistance would be appreaciated on how to restore the right-click
shortcut menu bar for the worksheet tab or how to reset all the
shortcut menu bars
comandbars. Unfortunately somehow I accidentily disabled a few shortcut
menu bars, like the right-click menu bar for the cell, row, column and
worksheet tab
I have thus far been enable to re-enable the right-click shortcut menu
for the cell, row and column, but cannot restore the right-click
shortcut menu for the worksheet tab...the one where you get the options
to Rename, Hide, Unhide etc.
I have tried the following code and all the code works except the one
for the "Sheet"
Code:
--------------------
Sub EnableMenus()
Dim myexcel As Object
Set myexcel = GetObject(, "Excel.Application") 'Point to active excel application
myexcel.CommandBars("Cell").Enabled = True
myexcel.CommandBars("Row").Enabled = True
myexcel.CommandBars("Column").Enabled = True
myexcel.CommandBars("Sheet").Enabled = True
End Sub
--------------------
I even tried to reset all the menubars using the following code and it
still doesn't work
Code:
--------------------
Sub EnableMenus()
Dim myexcel As Object
myexcel.MenuBars("worksheet").Reset
End Sub
--------------------
Any assistance would be appreaciated on how to restore the right-click
shortcut menu bar for the worksheet tab or how to reset all the
shortcut menu bars