HELP! Lost commandbar...

poolio

New Member
Joined
Oct 8, 2010
Messages
43
I've just been 'experimenting' with enabling / disabling and hiding / unhiding the various right-click options using this sort of thing...

VBA Code:
Sub UnHide_RightClick()
    Application.CommandBars("Cell").Controls("Cut").Visible = True
    Application.CommandBars("Cell").Controls("Copy").Visible = True
    Application.CommandBars("Cell").Controls("Paste").Visible = True
    Application.CommandBars("Cell").Controls("Paste Special...").Visible = True
    Application.CommandBars("Cell").Controls("Insert...").Visible = True
    Application.CommandBars("Cell").Controls("Delete...").Visible = True
    Application.CommandBars("Cell").Controls("Clear Contents").Visible = True
    Application.CommandBars("Cell").Controls("Insert Comment").Visible = True
    Application.CommandBars("Cell").Controls("Format Cells...").Visible = True
    Application.CommandBars("Cell").Controls("Pick From Drop-down List...").Visible = True
    Application.CommandBars("Cell").Controls("Add Watch").Visible = True
    Application.CommandBars("Cell").Controls("Create List...").Visible = True
    Application.CommandBars("Cell").Controls("Hyperlink...").Visible = True
    Application.CommandBars("Cell").Controls("Look Up...").Visible = True
End Sub
 
Sub ReEnable_RightClick()
    Application.CommandBars("Cell").Controls("Copy").Enabled = True
    Application.CommandBars("Cell").Controls("Paste").Enabled = True
    Application.CommandBars("Cell").Controls("Cut").Enabled = True
    Application.CommandBars("Cell").Controls("Paste Special...").Enabled = True
    Application.CommandBars("Cell").Controls("Clear Contents").Enabled = True
    Application.CommandBars("Cell").Controls("Insert Comment").Enabled = True
    Application.CommandBars("Cell").Controls("Format Cells...").Enabled = True
    Application.CommandBars("Cell").Controls("Pick From Drop-down List...").Enabled = True
    Application.CommandBars("Cell").Controls("Add Watch").Enabled = True
    Application.CommandBars("Cell").Controls("Create List...").Enabled = True
    Application.CommandBars("Cell").Controls("Hyperlink...").Enabled = True
    Application.CommandBars("Cell").Controls("Look Up...").Enabled = True
End Sub

Not sure what I've done but I appear to have lost them all!! and I can't get them back?!
I've tried:

VBA Code:
Sub Reset_RightClick()
       Application.CommandBars("Cell").Reset
End Sub

But to no avail...
Can anyone advise on how I remedy my situation?! :confused:
 
Last edited by a moderator:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top