Accelerator for a new command bar button

P

PathSmart

I have created a floating command bar, and added a button to it. I want to add
an accelerator key (Alt-S) but VBA says that the object does not support the
property or method. It seems that it should.

Here's what I have.

Set mybar = CommandBars.Add(name:="Scanning", Position:=msoBarFloating, _
Temporary:=True)
Set ScanIt = CommandBars("Scanning").Controls.Add(Type:=msoControlButton)
With ScanIt
.Style = msoButtonCaption
.Caption = "Next"
.OnAction = "FindText"
.Accelerator = "N" <<<------error point
End With


Thanks for whatever help you can offer.

Roy
 

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

Similar Threads


Top