ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   macro attached to command button - VBA form (https://www.excelbanter.com/excel-discussion-misc-queries/259013-macro-attached-command-button-vba-form.html)

Roy Gudgeon[_2_]

macro attached to command button - VBA form
 
Hi

Can I attach a previously contrsucted Macro to a new cmd button placed on a
VBA user form ?

If so how ?
--
thanks
Roy

Jacob Skaria

macro attached to command button - VBA form
 
Try calling that macro as below

Private Sub CommandButton1_Click()
Call Macroname
End Sub

--
Jacob


"Roy Gudgeon" wrote:

Hi

Can I attach a previously contrsucted Macro to a new cmd button placed on a
VBA user form ?

If so how ?
--
thanks
Roy


Roy Gudgeon[_2_]

macro attached to command button - VBA form
 
Hi Jacon

So easy, I'llget the hang of this eventually !

Got small problem with Macro but I'll sort that


--
thanks
Roy


"Jacob Skaria" wrote:

Try calling that macro as below

Private Sub CommandButton1_Click()
Call Macroname
End Sub

--
Jacob


"Roy Gudgeon" wrote:

Hi

Can I attach a previously contrsucted Macro to a new cmd button placed on a
VBA user form ?

If so how ?
--
thanks
Roy



All times are GMT +1. The time now is 01:47 AM.

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