Macro: Ask user how many times to repeat

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I get a window or dialog box to ask the user how many times to repeat
a macro?

Thanks in advance
Aryeh
 
Something like:

Sub Macro1()
Dim i As Long
For i = 1 To InputBox("How many times to you want to run Macor2?", "Run", 1)
Macro2
Next i
End Sub

Sub Macro2()

Selection.TypeText Text:="Now is the time for all good men ..."
Selection.TypeParagraph
End Sub
 
Back
Top