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.
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.
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" <[email protected]> wrote in message
news:[email protected]...
>
> 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
>
Just repeatedly call the same macro that clicking the button causes to run.
--
Regards,
Tom Ogilvy
"petros89" <[email protected]> wrote in
message news:[email protected]...
>
> 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
>
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks