ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating a macro which presses a button containing a recorded macro (https://www.excelbanter.com/excel-programming/341962-creating-macro-presses-button-containing-recorded-macro.html)

petros89[_3_]

Creating a macro which presses a button containing a recorded macro
 

Is there any way I can create a button which repeatedly click another
button containing a macro? If so, please help me as I need it for my
school work.


--
petros89
------------------------------------------------------------------------
petros89's Profile: http://www.excelforum.com/member.php...o&userid=24645
View this thread: http://www.excelforum.com/showthread...hreadid=473343


Bernie Deitrick

Creating a macro which presses a button containing a recorded macro
 
Remove the Private keyword from in front of the commandbutton_click event, and use a sub like

Sub TryNow()
Dim i As Integer
For i = 1 To 10
Sheet1.CommandButton1_Click
Next i
End Sub


--
HTH,
Bernie
MS Excel MVP


"petros89" wrote in message
...

Is there any way I can create a button which repeatedly click another
button containing a macro? If so, please help me as I need it for my
school work.


--
petros89
------------------------------------------------------------------------
petros89's Profile: http://www.excelforum.com/member.php...o&userid=24645
View this thread: http://www.excelforum.com/showthread...hreadid=473343




Tom Ogilvy

Creating a macro which presses a button containing a recorded macro
 
Just repeatedly call the same macro that clicking the button causes to run.

--
Regards,
Tom Ogilvy


"petros89" wrote in
message ...

Is there any way I can create a button which repeatedly click another
button containing a macro? If so, please help me as I need it for my
school work.


--
petros89
------------------------------------------------------------------------
petros89's Profile:

http://www.excelforum.com/member.php...o&userid=24645
View this thread: http://www.excelforum.com/showthread...hreadid=473343




[email protected]

Creating a macro which presses a button containing a recorded macro
 
add a button in excel worksheet
right click and select view code

Private Sub CommandButton1_Click()
Call macro1
End Sub


petros89 yazdi:
Is there any way I can create a button which repeatedly click another
button containing a macro? If so, please help me as I need it for my
school work.


--
petros89
------------------------------------------------------------------------
petros89's Profile: http://www.excelforum.com/member.php...o&userid=24645
View this thread: http://www.excelforum.com/showthread...hreadid=473343




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

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