LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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



 
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
I want a macro to save a workbook as a user inputted cell EAHRENS Excel Discussion (Misc queries) 3 November 8th 05 03:28 PM
Macro for user to input 10 numbers Deedee New Users to Excel 4 October 21st 05 07:44 PM
macro that brings user to cell based on "yes/no" response lennyx2 Excel Discussion (Misc queries) 2 February 9th 05 02:47 PM
Links in formulas change when another user runs a workbook L Mehl Excel Discussion (Misc queries) 2 November 27th 04 09:27 PM
Macro for multiple charts JS Excel Worksheet Functions 1 November 19th 04 03:44 AM


All times are GMT +1. The time now is 08:43 AM.

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"