Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Creating a button in Macro rmann11 Excel Discussion (Misc queries) 2 October 7th 09 03:31 PM
Invalid outside procedure (creating a PDF button as a macro) Neall Excel Worksheet Functions 0 April 30th 09 03:44 PM
Creating a Macro Button to Extract Data william4444 New Users to Excel 2 July 4th 06 04:38 AM
Creating a Macro Button to Extract Data william4444 New Users to Excel 0 June 22nd 06 02:53 AM


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"