Expert Needed: How do you in a loop or with an array go from
Dim Variable1 As String
Call ibrd(udDevice, Variable1)
Dim VariableDbl1 As Double
VariableDbl1 = CDbl(Variable1)
'display response in appropriate cell
Worksheets("Temp1").Range("F53").value = VariableDbl1
to this, without copying and pasting and changing variable1..2..3.4..5
Dim Variable2 As String
Call ibrd(udDevice, Variable2)
Dim VariableDbl2 As Double
VariableDbl2= CDbl(Variable2)
'display response in appropriate cell
Worksheets("Temp1").Range("F54").value = VariableDbl2
I am trying to create a loop or an array which instead of copying and paste the bottom line and code and making Variable1 to Variable 2 and VariableDbl1 to VariableDbl2. The thing which I was having a problem was is how to increment a String or make a variable with an incremented value after it. Any thoughts?
I had to do Dim Variable1 as String, then convert it to double afterwards, because or else it would give me a Compile error: ByRef argument type mismatch.
Instead of making a 5 of these:
Thanks in advanced
Bookmarks