![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Philippines
Posts: 55
|
Have a macro which runs 3 submacros. What do I use to have this macro repeat itself a specified number of times?
Here's the macro: Sub Extract1() ' ' Extract1 Macro ' Macro recorded 4/5/2002 by Hans ' ' Application.Run "'Address Retriever2.xls'!Extract" Application.Run "'Address Retriever2.xls'!SelectRange1" Application.Run "'Address Retriever2.xls'!Distribute" End Sub Hans |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
Simply put it in a loop of some sort. For example, place For i = 1 to 3 At the top of the macro And Next i At the bottom and it will do everything 3 times. Rgsd AJ |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Philippines
Posts: 55
|
Thanks AJ,
Soon I'm gonna know it all Hans |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|