Trouble with Loop Plz HELP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • game8424
    New Member
    • Jun 2007
    • 1

    Trouble with Loop Plz HELP

    How do you in a loop or with an array go from


    Code:

    Dim Variable1 As String
    Call ibrd(udDevice, Variable1)
    Dim VariableDbl1 As Double
    VariableDbl1 = CDbl(Variable1)

    'display response in appropriate cell
    Worksheets("Tem p1").Range("F53 ").value = VariableDbl1


    to this, without copying and pasting and changing variable1..2..3 .4..5

    Code:

    Dim Variable2 As String
    Call ibrd(udDevice, Variable2)
    Dim VariableDbl2 As Double
    VariableDbl2= CDbl(Variable2)

    'display response in appropriate cell
    Worksheets("Tem p1").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?
Working...