ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Placing action on a button!! (https://www.excelbanter.com/excel-programming/345937-placing-action-button.html)

loopoo[_4_]

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


Chip Pearson

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




loopoo[_5_]

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



All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com