Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,113
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm using this sub below to loop a data list to create reports where it runs until the number specified inside of this code.
This number changes according to how much data there is on the list which changes every time.
Here for example the sub would run until line 16.
My question is how can I provide a popup for the
to ask the user how many lines of data do you have?
This way the sub would run until that entered number asked by the popup instead of going into VBA and changing that line in the code?
Please let me know, if you can provide a code.
Thank you,
Pinaceous
I'm using this sub below to loop a data list to create reports where it runs until the number specified inside of this code.
This number changes according to how much data there is on the list which changes every time.
Code:
Sub Test()
Dim i As Integer
i = 2
Do Until i > 16
'Change # According to How Many Lines Of Data You Have
Call Macro1
Call Save_ActSht_as_Pdf
Application.Wait (Now + TimeValue("0:00:1"))
i = i + 1
Loop
Call Macro2
End Sub
Here for example the sub would run until line 16.
My question is how can I provide a popup for the
Code:
Sub Test ()
This way the sub would run until that entered number asked by the popup instead of going into VBA and changing that line in the code?
Please let me know, if you can provide a code.
Thank you,
Pinaceous