First of all YAY the forum is finally back to normal! Thank you ![Smilie](https://www.excelforum.com/images/smilies/smile.gif)
So this is probably exceptionally simple but maybe I've just been doing too much coding where everything looks the same.
Background:
I'm trying to write a simple macro to create an input to Unix for something a program I'm calling and giving all of it's inputs, over and over again. I'm automating this so I'm not entering in the 100k+ runs manually. I'm stuck on getting vba to output the array to the sheet properly.
Public Sub batch()
Dim s, v, i, t, j, x
s = InputBox("how many files?")
v = InputBox("how many runs?")
x = s * v
ReDim t(1 To 6, 1 To v)
For j = 1 To s
For i = 1 To v
t(1, i) = "batch"
t(2, i) = "/acct"
t(3, i) = "Run" & j & i
t(4, i) = "n"
t(5, i) = "Sam"
t(6, i) = "Enddata"
Next i
Next j
Range("A1:A" & x) = t
End Sub
So if you enter in 2 for the files and 3 for the runs it should output something that loops like:
example_output.xlsx
Any help would be appreciated. Thanks
Bookmarks