Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Imbedded buton to run macro?

I run XL2003
I have designed a button embedded in my worksheet.
I want my new button to run a macro which I recorded.

How do I assign a specific macro to a specific button?

I don't want to customize a button on a menu!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Imbedded buton to run macro?

Of and running

"Fritz" wrote:

I run XL2003
I have designed a button embedded in my worksheet.
I want my new button to run a macro which I recorded.

How do I assign a specific macro to a specific button?

I don't want to customize a button on a menu!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Imbedded buton to run macro?

Hi Fritz,

You already have the button embedded, so go into Design Mode (on the Visual
Basic toolbar - I expect you are already there considering you have the
button). Then just double click that button and the Visual Basic editor
should open in the worksheet module in the Click Event of the button that you
created:

Private Sub myButton_Click()

End Sub

You can either write your macro code in this sub, or call your macro from it:

Private Sub myButton_Click()
myMacro
End Sub

If your macro is contained in another module, make sure it isn't declared as
Private, or the call from the Worksheet module won't find it. I think, by
default, recorded macros aren't declared and are therefore public anyway.

"Fritz" wrote:

I run XL2003
I have designed a button embedded in my worksheet.
I want my new button to run a macro which I recorded.

How do I assign a specific macro to a specific button?

I don't want to customize a button on a menu!

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
Imbedded button to run macro Fritz Excel Discussion (Misc queries) 3 July 22nd 07 02:00 AM
What is Fx buton in excel? driller Excel Discussion (Misc queries) 10 November 18th 06 10:21 PM
How to Check Empty Rows in Sheet2 when sheet1 buton clicked bernardng[_4_] Excel Programming 2 May 22nd 06 12:00 PM
Imbedded .pdf or .doc files Phil H Excel Programming 2 March 2nd 06 12:27 PM
Custom buton for macro in an Addin file. Karthik Bhat - Bangalore Excel Programming 1 August 17th 05 01:09 PM


All times are GMT +1. The time now is 05:09 AM.

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"