Right-click options Excel 2007/2010

User avatar
ErikJan
BronzeLounger
Posts: 1265
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Right-click options Excel 2007/2010

Post by ErikJan »

In Excel 2003, on al my system I ran this code once:

Code: Select all

Sub E_Right_Click()
    Application.CommandBars("Cell").Reset    'to reset any changes made
    With Application.CommandBars("Cell").Controls.Add(msoControlButton, 3058, , 5, False)
        .Caption = "Conditional Formatting..."
        '.FaceId = 481
    End With
    '
    With Application.CommandBars("Cell").Controls.Add(msoControlButton, 2034, , 5, False)
        .Caption = "Validation..."
    End With
End Sub
What this did was add the options "Conditional Formatting" and "Validation" to my right mouse click.

I'm now in Excel 2007 (and 2010); I haven't tested but I'm almost sure this won't work... so how do I get this done now?

User avatar
HansV
Administrator
Posts: 78667
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Right-click options Excel 2007/2010

Post by HansV »

The code works for me in Excel 2010.
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1265
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Right-click options Excel 2007/2010

Post by ErikJan »

Yep, acknowledged... sorry I didn't try first