View Single Post
  #3   Report Post  
Harald Staff
 
Posts: n/a
Default User to decide how often a macro runs

One way among several:

Sub test()
Dim L As Long, X As Long
L = Application.InputBox("Pick a number:", Type:=1)
For X = 1 To L
Call SubProc(X, L)
Next
End Sub

Sub SubProc(L As Long, LMax As Long)
MsgBox "Yo da man !", vbExclamation, L & " of " & LMax
End Sub

HTH. Best wishes Harald

"Deedee" skrev i melding
...
Can anyone help...Please.... I need a macro that asks for the user to

input
the number of times it needs to run. Thanks for any help in advance