Custom buttons ona toolbar

D

DavidC

Hi,
I have been struggling for the past few hours trying to get a custom button
onto a custom toolbar to point to a macro.

I have the following code:

Set mybar = CommandBars _
.Add(Name:="Progress Reports", Position:=msoBarTop, _
Temporary:=True)

CommandBars("Progress Reports").Visible = True

CommandBars("Progress Reports").Controls.Add Type:=msoControlButton,
ID:=40001, Before:=1, Parameter:="Macro ""Refurbishment Issue 3C Rev 2a
20050715.mpp!Progress_Reports"""
At the moment I get the toolbar created but do not get any visible image or
text on the button. Clicking in that area works, but of course with no
visible sign of the button any other person will have difficulty working.
I have tried the "record macro" option, but no macro is created when I
change the name and image etc of the button.

Any thoughts please.
 
R

Rod Gill

Try recording a macro of you creating the button from scratch. You're
missing the action property.
 

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