Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fill across row instead of down column

Status
Not open for further replies.

xxentric

Technical User
Oct 14, 2009
35
0
0
US
i have just a loop code here as an example of how im filling data down a column... how could i do this the other way and have it fill the data across a row instead?
Code:
Do While myRecSet.EOF = False
    myRecipe(i) = CStr(myRecSet.Fields(0).Value)

    ThisWorkbook.Worksheets("Sheet1").Range("A" & 8 + i).Value = myRecSet.Fields(0).Value

    myRecSet.MoveNext
    i = i + 1
Loop
 

how about
Code:
ThisWorkbook.Worksheets("Sheet1").Range(chr(64+i) &1).Value = myRecSet.Fields(0).Value
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top