Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Assign Macron to Button

Hi I have recorded a macro to Print the "print area" and made a button on a
sheet.

macro is working properly when I run it. How can I assign to the button.
I could not see anywhere where it says "Assign Macro"
Even in Microsoft help it mentioned that Be in a design mode and right click
on the button and select Assign Macro. I tried but no luck :(

any idea please.

winxp SP2/Office 2003

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Assign Macron to Button

Hi MahaRaj

You are using a button from the Control Toolbox, this button have a click event.
On a button from the Forms Toolbar you can right click and assign a macro

Press the first button on the control toolbox to go into the design mode
Double click on the button you placed on your worksheet.
The VBA editor will open with this

Private Sub CommandButton1_Click()

End Sub

You can place the code in the event or place the macroname in the event.

Press Alt-q to go back to Excel and press the first button on the control toolbox again to exit the design mode

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


"MahaRaj®" wrote in message ...
Hi I have recorded a macro to Print the "print area" and made a button on a sheet.

macro is working properly when I run it. How can I assign to the button.
I could not see anywhere where it says "Assign Macro"
Even in Microsoft help it mentioned that Be in a design mode and right click on the button and select Assign Macro. I tried but no
luck :(

any idea please.

winxp SP2/Office 2003

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Assign Macron to Button

Thanks RON
you were right I made button from Toolbox. But I did not know about FORM.

Thanks. it sorted now. I am gonna play with it now.

Maha


"Ron de Bruin" wrote in message
...
Hi MahaRaj

You are using a button from the Control Toolbox, this button have a click
event.
On a button from the Forms Toolbar you can right click and assign a macro

Press the first button on the control toolbox to go into the design mode
Double click on the button you placed on your worksheet.
The VBA editor will open with this

Private Sub CommandButton1_Click()

End Sub

You can place the code in the event or place the macroname in the event.

Press Alt-q to go back to Excel and press the first button on the control
toolbox again to exit the design mode

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


"MahaRaj®" wrote in message
...
Hi I have recorded a macro to Print the "print area" and made a button on
a sheet.

macro is working properly when I run it. How can I assign to the button.
I could not see anywhere where it says "Assign Macro"
Even in Microsoft help it mentioned that Be in a design mode and right
click on the button and select Assign Macro. I tried but no luck :(

any idea please.

winxp SP2/Office 2003

Thanks





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 assign a symbol to a button (like the $ button) NickW Excel Discussion (Misc queries) 2 September 6th 05 02:45 PM
Assign auto_open to a button MJO Excel Discussion (Misc queries) 1 April 11th 05 04:54 PM
Assign Sub to Custom Button Aggie94 Excel Programming 4 August 14th 04 05:50 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


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