Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to assign a macro to a button

I have a procedure that consists of 4 subs, they are all saved in a module
"Update", the first sub calls out to the others in order. I would like to
run this from a button on the spreadsheet. However when I create the
button, and select 'view code' it creates a macro in the spreadsheet. Can
this be redirected to run from the module or can I call my Update module
from it, and please tell me how ???


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to assign a macro to a button

I may have answered my own question Application.Run ("Update") will call
out and run the public sub in the module. But if there is a way to have the
button run the module public sub without going through the worksheet sub,
please let me know...
Thanks...
=========================================
"WANNABE" <breichenbach AT istate DOT com wrote in message
...
I have a procedure that consists of 4 subs, they are all saved in a module
"Update", the first sub calls out to the others in order. I would like to
run this from a button on the spreadsheet. However when I create the
button, and select 'view code' it creates a macro in the spreadsheet. Can
this be redirected to run from the module or can I call my Update module
from it, and please tell me how ???



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to assign a macro to a button

Hi WANNABE

Enter the macro name in the click event of the button

Private Sub CommandButton1_Click()
Call yourMacroName
End Sub

Or use a button from the Forms toolbar
you can right click on it and use Assign macro

--
Regards Ron de Bruin
http://www.rondebruin.nl



"WANNABE" <breichenbach AT istate DOT com wrote in message ...
I have a procedure that consists of 4 subs, they are all saved in a module "Update", the first sub calls out to the others in
order. I would like to run this from a button on the spreadsheet. However when I create the button, and select 'view code' it
creates a macro in the spreadsheet. Can this be redirected to run from the module or can I call my Update module from it, and
please tell me how ???



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
Assign a macro to a button totofab Excel Discussion (Misc queries) 4 December 13th 07 06:16 PM
How do I Assign Macro to a button? BellExcel Charts and Charting in Excel 4 May 20th 05 07:21 PM
Assign macro to button Bob Phillips[_6_] Excel Programming 0 May 24th 04 04:27 PM
Assign macro to button Frank Kabel Excel Programming 0 May 24th 04 04:03 PM
Assign button to run macro jamie85[_5_] Excel Programming 8 February 3rd 04 01:44 PM


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

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

About Us

"It's about Microsoft Excel"