Lost the "right click" cut/copy/paste

mussermike

New Member
Joined
Jun 25, 2009
Messages
19
Somehow I lost the right click, cut, copy, paste, special paste. They are still there but "grayed out". The workbook is not protected either. Any thoughts. They are even "grayed out" when I open a brand new sheet.
Help please!:confused: Im using excel 2007.
 
Somehow I lost the right click, cut, copy, paste, special paste. They are still there but "grayed out". The workbook is not protected either. Any thoughts. They are even "grayed out" when I open a brand new sheet.
Help please!:confused: Im using excel 2007.

This is to help someone browsing to this thread: "Close excel. Browse to c:\Users\<USER><user>\AppData\Roaming\Microsoft\Excel and make the folder blank; no directory/No files should exist. Restart excel."</user>
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You must know the name of the command bar you want to reset if you want to use the original solution: Commandbars("Cell").Reset
where "Cell" is the name of the command bar.

The sample code below will print a list of the built in command bar names in column A of the active worksheet. Put the code in a standard module in a new workbook. If you "uncomment" the indicated line of code it will reset all of the command bars to their original configuration. Resetting everything is probably a bad idea if you have modified a lot of command bars. You could also try resetting some likely candidates based on their name(s) from column A eg Commandbars("Row").Reset or Commandbars("Column").Reset

Code:
Public Sub ListCbars()

Dim oCommBar As CommandBar
Dim oCell As Range

Set oCell = ActiveSheet.Range("A1")

For Each oCommBar In ThisWorkbook.Application.CommandBars

    If oCommBar.BuiltIn Then
    
        oCell.Value = oCommBar.Name
        Set oCell = oCell.Offset(1, 0)
        'oCommBar.Reset 'Uncomment this line to reset all built in command bars
    End If
    
Next oCommBar

End Sub

@gary master: I've taken your macro a step further, if you don't mind. :P

I've added the captions of the various built-in commandbars that are available in adjacent cells.

Code:
Public Sub ListCbars()
'https://www.mrexcel.com/forum/excel-questions/448364-lost-right-click-cut-copy-paste-2.html
    Dim oCommBar As CommandBar, oBarControl As CommandBarControl
    Dim oCell As Range
    Dim intItems As Integer

    Speedo False, False, False, False
    Set oCell = ActiveSheet.Range("A1")

    For Each oCommBar In ThisWorkbook.Application.CommandBars

        If oCommBar.BuiltIn Then
            oCell.Value = oCommBar.Name
            intItems = 1
            For Each oBarControl In oCommBar.Controls
                oCell.Offset(0, intItems).Value = oBarControl.Caption
                intItems = intItems + 1
            Next
            Set oCell = oCell.Offset(1, 0)
            'oCommBar.Reset 'Uncomment this line to reset all built in command bars
        End If

    Next oCommBar
    Speedo True, True, True, True
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,378
Messages
6,124,601
Members
449,173
Latest member
chandan4057

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