![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 31
|
Can anyone help with a problem I'm having passing the Array 'READING$' below into excel. It works fine however the information will only display across in rows. I need it to display down in columns. Right now it only diplays my first data entry and repeats it 100x's from A1 to A100. If I change the range from A1 to HA1 it displays all the data but in rows and not columns. Hope you understand. Thanks
-------------------------------------------- Dim o As Object Dim i As Integer Dim iNumbers(1 To 200) As Integer traceb = Split(READING$, ",", 202) For i = LBound(iNumbers) To UBound(iNumbers) iNumbers(i) = traceb(i) Next i Set o = CreateObject("excel.application") o.Visible = True o.Workbooks.Add o.sheets("sheet1").Range("A1:A100").Value = iNumbers |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Try Dim iNumbers as a Variant then change to Dim iNumbers(200,1) + readin as IiNumbers(i,1) ' ' eg. Dim o As Object Dim i As Integer 'Dim iNumbers(1 To 200) As Integer Dim iNumbers(200, 1) traceb = Split(READING$, ",", 202) For i = LBound(iNumbers) To UBound(iNumbers) iNumbers(i, 1) = traceb(i) Next i Set o = CreateObject("excel.application") o.Visible = True o.Workbooks.Add o.Sheets("sheet1").Range("A1:A100").Value = iNumbers |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 31
|
Thanks for your help. I think I can get it to work. Its opening the worksheet but now its not posting any data.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|