Creating a button on Excel Toolbar

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

Hey guys,

I need when a workbook is opened, for it to create a
button on the Excel toolbar that contains the following
code....

If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If
Worksheets(1).Range("C5").Select
ActiveSheet.Paste
MsgBox "Data Pasted!", vbOKOnly


I need this button to be visible on ANY workbook opened
after this button is created.


Is this possible?

Thanx

Todd Huttenstine
 
Create your macro and give it a name. Put it in a general module -
probably in Personal.xls would be good.

go to tools=>customize and select the second tab (commands)

in the left window select macros and in the right window click and drag the
custom button to the toolbar where you want the button.

Right click on the button and select assign macro - optionally change the
icon if you want an icon displayed.

now you can close the customize dialog.
 
Thank you

-----Original Message-----
Create your macro and give it a name. Put it in a general module -
probably in Personal.xls would be good.

go to tools=>customize and select the second tab (commands)

in the left window select macros and in the right window click and drag the
custom button to the toolbar where you want the button.

Right click on the button and select assign macro - optionally change the
icon if you want an icon displayed.

now you can close the customize dialog.

--
Regards,
Tom Ogilvy




.
 
Back
Top