View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Create a toolbar button

Add this to your personal.xls workbook

'-----------------------------------------------------------------
Private Sub Workbook_Open()
'-----------------------------------------------------------------

On Error Resum Next
Application.CommandBars("Formatting").Controls("My Button")
On Error Goto 0

With Application.CommandBars("Formatting").Controls.Add
.BeginGroup = True
.Caption = "My Button"
.Style = msoButtonCaption
.OnAction = "myMac ro"
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"excelnut1954" wrote in message
oups.com...
I've been looking at the help, and other posts here long enough. What I
want seems simple, but maybe it's not.

I want to create a toolbar button.
I want to insert a macro inside this button.
I want this button to be there whenever I bring Excel up. Not specific
to any 1 file.

I've gone in the Tools/Customize are, and I've created a new Toolbar.
Ok, now what? I don't see anything to create a button for the toolbar.

Can anyone help?
Thanks,
J.O.