Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Graphical button and Macro

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".
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Graphical button and Macro


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

"David T" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Graphical button and Macro

That's awesome!!! It worked perfectly. Thanks!!!!!!!!!!!!!!!!!!!!!!!



"Toppers" wrote:


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

"David T" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphical Representation cityinday Excel Discussion (Misc queries) 4 March 19th 06 04:44 AM
use macro button to run macro in protected sheet earl Excel Discussion (Misc queries) 3 February 26th 06 10:21 PM
Generate a graphical formula from a column of data rmellison Excel Discussion (Misc queries) 2 October 17th 05 03:58 PM
Creating a graphical formula from a set of data rmellison Charts and Charting in Excel 1 October 17th 05 11:35 AM
graphical problems Damsel in distress Charts and Charting in Excel 0 April 5th 05 02:47 PM


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"