PC Review


Reply
Thread Tools Rate Thread

Attach Macro to button?

 
 
=?Utf-8?B?RnJpdHo=?=
Guest
Posts: n/a
 
      21st Jul 2007
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 With Quote
 
 
 
 
David Hilberg
Guest
Posts: n/a
 
      21st Jul 2007
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 <Fr...@discussions.microsoft.com> 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 With Quote
 
=?Utf-8?B?RnJpdHo=?=
Guest
Posts: n/a
 
      22nd Jul 2007
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 <Fr...@discussions.microsoft.com> 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 With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      22nd Jul 2007
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 <Fr...@discussions.microsoft.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: attach a control to a button Chris Microsoft C# .NET 2 3rd Aug 2005 02:41 PM
in this version I can not attach a Macro to a Button =?Utf-8?B?SHVzc2FtIEJhY2hhdA==?= Microsoft Excel Misc 3 13th Jul 2005 09:08 AM
Using button to attach =?Utf-8?B?ZW5yaWNvMTk4Mg==?= Microsoft Access Forms 0 21st Dec 2004 01:29 PM
how to attach macro to combo button =?Utf-8?B?cGFt?= Microsoft Access 7 18th Aug 2004 04:47 PM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar Microsoft Excel Programming 1 26th May 2004 09:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.