Graphical button and Macro

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".
 
G

Guest

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
 

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

Top