Hello,
I have this do until loop in my script:
'=========================================================
Range(cellchoice).Select
Do Until ActiveCell.Value = Empty
ActiveCell.Offset(0, 29).Value = RandomNumber
ActiveCell.Offset(1, 0).Select
Randomize
RandomNumber = Int(Rnd * (Highest + 1 - Lowest)) + Lowest
Loop
'=========================================================
What I would like to do is, collect the offset number from an input box from the user that is running the script to indicate what row the random number will be inserted into. So in the command ActiveCell.Offset(0, 29).Value = RandomNumber, I would like the user to be able to enter the number to take place of the 29. It would be something like, ActiveCell.Offset(0, (definednumber)).Value = RandomNumber.
Where definednumber would be entered during the beginning of the routine via an input box. Does anyone know what I need to do to make this happen, or if I am going about this the wrong way?
I have this do until loop in my script:
'=========================================================
Range(cellchoice).Select
Do Until ActiveCell.Value = Empty
ActiveCell.Offset(0, 29).Value = RandomNumber
ActiveCell.Offset(1, 0).Select
Randomize
RandomNumber = Int(Rnd * (Highest + 1 - Lowest)) + Lowest
Loop
'=========================================================
What I would like to do is, collect the offset number from an input box from the user that is running the script to indicate what row the random number will be inserted into. So in the command ActiveCell.Offset(0, 29).Value = RandomNumber, I would like the user to be able to enter the number to take place of the 29. It would be something like, ActiveCell.Offset(0, (definednumber)).Value = RandomNumber.
Where definednumber would be entered during the beginning of the routine via an input box. Does anyone know what I need to do to make this happen, or if I am going about this the wrong way?