Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
khurram saddique
 
Posts: n/a
Default how to run macro in userform button

i have made a button (cmd1) on form (frm1)
i want to run a macro by clicking the button what should i do
regards
  #2   Report Post  
tjtjjtjt
 
Posts: n/a
Default

Open up the VBE and Double-Click on the button in question. This will take
you to the button's module with the Button_Click() event already selected.
Type or paste the code into this sub procedure.

I assume you know where the to go to access the VBE, but here are quick
direction just in case. Press Alt+F11 on your keyboard.

tj

"khurram saddique" wrote:

i have made a button (cmd1) on form (frm1)
i want to run a macro by clicking the button what should i do
regards

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub CommandButton1_Click()
myMacro
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"khurram saddique" wrote in
message ...
i have made a button (cmd1) on form (frm1)
i want to run a macro by clicking the button what should i do
regards



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
How can I run a macro in the background whilst a UserForm is visib cdb Excel Discussion (Misc queries) 3 February 10th 05 06:58 PM
Assigning a macro to a "button" Yvon Excel Discussion (Misc queries) 6 February 8th 05 10:58 PM
How to assign a macro to a commnd button Mickey Blue Eyes Excel Discussion (Misc queries) 2 January 4th 05 02:15 PM
assign a macro to a control button ewan72 Excel Discussion (Misc queries) 1 December 3rd 04 02:04 PM
Macro button colour change??? Beefyme Excel Worksheet Functions 1 November 19th 04 06:15 PM


All times are GMT +1. The time now is 06:09 PM.

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"