Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Placing action on a button!!


Hello!

I'm new to VBA and I need some help for a basic thing:

I developed a macro, "export_data", and I want to launch it when
press a button.
I've created a command button from User Form, but I don't know how t
place the action (when I press the button, the macro should b
launched), and also, how to add this button in the Excel worksheet
because it's only designed in VBA.

Thanks in advance,
Chri

--
loopo
-----------------------------------------------------------------------
loopoo's Profile: http://www.excelforum.com/member.php...fo&userid=2879
View this thread: http://www.excelforum.com/showthread.php?threadid=48619

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Placing action on a button!!

If you double-click on the button while you're in design mode in
the VBA Editor, you'll be taken to the _Click event of the
button. Paste the code there.

You can add a button directly on the worksheet by opening the
Forms command bar, and dragging a button onto the sheet. Right
click the button and choose Assign Macro. Assign your macro to
the button.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"loopoo"
wrote in message
...

Hello!

I'm new to VBA and I need some help for a basic thing:

I developed a macro, "export_data", and I want to launch it
when I
press a button.
I've created a command button from User Form, but I don't know
how to
place the action (when I press the button, the macro should be
launched), and also, how to add this button in the Excel
worksheet,
because it's only designed in VBA.

Thanks in advance,
Chris


--
loopoo
------------------------------------------------------------------------
loopoo's Profile:
http://www.excelforum.com/member.php...o&userid=28792
View this thread:
http://www.excelforum.com/showthread...hreadid=486194



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Placing action on a button!!


Thanks a lot for your help.

Chri

--
loopo
-----------------------------------------------------------------------
loopoo's Profile: http://www.excelforum.com/member.php...fo&userid=2879
View this thread: http://www.excelforum.com/showthread.php?threadid=48619

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
Using an action button. MichaelZ Excel Discussion (Misc queries) 4 March 24th 10 02:55 PM
Action button Davey Excel Discussion (Misc queries) 1 October 27th 09 10:49 AM
Placing a Command Button in a New Tool Menu Office Junior[_2_] Excel Discussion (Misc queries) 2 May 12th 07 04:50 PM
placing a button directly in a sheet kemel Excel Discussion (Misc queries) 1 August 1st 06 03:25 PM
Placing a 'find'(ctrl+F) button in a UserForm abxy[_58_] Excel Programming 2 April 29th 04 03:16 AM


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