Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
After I've recorded a macro, how do I tell it how many times I want it to
repeat? |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
By coding repetition into your macro. You can't record this, you have to go
into the vba editor and write computer code. http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm What is your macro doing? There may be a better tool than a macro. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "lee" wrote in message ... After I've recorded a macro, how do I tell it how many times I want it to repeat? |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
If you want to repeat an entire macro a certain number of time, you
would need to call it that number of time. For example the following code calls the macro named "CountDown" ten times: Sub Test() Dim i As Long For i = 1 To 10 CountDown i Next i MsgBox "We have a liftoff." End Sub Sub CountDown(i As Long) MsgBox "T-" & 11 - i & " seconds and counting." End Sub If your macro is performing a specific steps and you want to repeat that step you would use a similiar construction to repeat the step: Sub Test() Dim i As Long MsgBox "T-10 seconds. We have main motor start." For i = 1 To 9 MsgBox "T-" & 10 - i Next i MsgBox "We have a liftoff." End Sub |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Repeat a macro? | Microsoft Word Help | |||
Repeat macro until end of document | Microsoft Word Help | |||
how do you make a macro execute x number of times? | Microsoft Word Help | |||
Want to Repeat Records certain number of times | Mailmerge | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge |