I am trying to transpose the data that I am bringing in from a recordset from rows to colomns. The code below currently pastes the data verticaly. Any suggestions would be great.
Code:
For Each Box_Number In Box_NumberList
With rsUnits
' Assign the Connection object
.ActiveConnection = cnUnits
' Extract the time stamp
.Open "SELECT [RunNumber] FROM [PFDBMirror].[Abound].[Box] WITH(NOLOCK) INNER JOIN [dbo].[UnitDisposition] WITH(NOLOCK) ON [UnitDisposition].[BoxID] = [Box].[BoxNumber] Where [Box].[BoxNumber]='" & Box_Number.Value & "';"
' Copy the Run Number into cells Q:2 on Sheet2
Sheet2.Range("Q" & Box_Number.Row).CopyFromRecordset rsUnits
.Close
End With