Right click menu

M

Mats.Bergstrand

Does someone have an idea why this doesn´t work?
I had a crash and had to reinstall Excel.
When trying to add controls again to my right click menu I get an error
on the line .OnAction stating
"Fault nr '-2147467259 (80004005)'.:
The method 'OnAction' in the object '_CommandBarButton' failed"

By adding On error resume next I can read that
..OnAction had become the value .OnAction = ""


Set Newitem3 = CommandBars("Cell").Controls.Add
With Newitem3
.Caption = "Klistra in summa"
.OnAction = "Klistra_in_summa"
End With

Any help appriciated as I find the right click menues very helpful

Mats Bergstrand
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top