Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Attach Macro to button?

I know how to design a button, and I know how to record a macro but I can't
figure out how to attach the macro to the button?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Attach Macro to button?

Are you using xl2003 or earlier? Is the button on a command bar (not
embedded in a sheet)? If yes to both:

Tools Customize
Right Click the button
Choose "Assign Macro"

- David

On Jul 21, 12:44 pm, Fritz wrote:
I know how to design a button, and I know how to record a macro but I can't
figure out how to attach the macro to the button?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Attach Macro to button?

Using XL2003. The button is my designed embedded in the worksheet.

"David Hilberg" wrote:

Are you using xl2003 or earlier? Is the button on a command bar (not
embedded in a sheet)? If yes to both:

Tools Customize
Right Click the button
Choose "Assign Macro"

- David

On Jul 21, 12:44 pm, Fritz wrote:
I know how to design a button, and I know how to record a macro but I can't
figure out how to attach the macro to the button?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Attach Macro to button?

One way to do it is to call it via the click event:

Private Sub CommandButton1_Click() 'Or whatever name
myMacro 'Your macro name here if it is in the standard module
End Sub

If your macro is in a sheet you might have to use Run (macro name)

"Fritz" wrote:

Using XL2003. The button is my designed embedded in the worksheet.

"David Hilberg" wrote:

Are you using xl2003 or earlier? Is the button on a command bar (not
embedded in a sheet)? If yes to both:

Tools Customize
Right Click the button
Choose "Assign Macro"

- David

On Jul 21, 12:44 pm, Fritz wrote:
I know how to design a button, and I know how to record a macro but I can't
figure out how to attach the macro to the button?




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
Attach button disabled Pawan Excel Discussion (Misc queries) 0 September 1st 08 11:28 AM
Attach password to Button? mike Excel Programming 2 October 16th 06 09:33 PM
in this version I can not attach a Macro to a Button Hussam Bachat Excel Discussion (Misc queries) 3 July 13th 05 09:08 AM
Mailto / Attach... Button to do so? Siggsy007[_4_] Excel Programming 0 September 21st 04 08:43 AM
Mailto / Attach... Button to do so? Siggsy007[_3_] Excel Programming 0 September 20th 04 05:04 PM


All times are GMT +1. The time now is 10:09 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"