Graphical button and Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a workbook that has several sheets that i want to add a graphical
button which is linked to a macro. Instead of going sheet by sheet to add
the graphical button and the macro, is there any way i can create a macro
that will add a graphical button to every sheet in the workbook and Call a
certain macro named "Format".
 
This uses the button from the FORMS toolbar:

Sub Macro1()
Application.CommandBars("Forms").Visible = True
For ws = 1 To Worksheets.Count
Worksheets(ws).Select
ActiveSheet.Buttons.Add(241.2, 25.2, 94.2, 28.8).Select
Selection.OnAction = "Macro2"
Selection.Characters.Text = "Format"
Next
End Sub

HTH
 
Back
Top