Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can run to following code in Excel 2003 but when I run it in Excel 2000 I
get an error/debug at the line Set rngFrom = <<< Should I declare different variables because of 2000 version? **** Sub ADP_ExportExcel() 'transpose horizontal column output (multiCol) into single column (vertical) Dim rngFrom As Range Dim rngTo As Range Dim rng As Range With Sheets("sheet1") Set rngFrom = .Range(.Range("A1"), .Cells(Rows.Count, "A").End(xlUp)) << End With Set rngTo = Sheets("sheet2").Range("A1") For Each rng In rngFrom rngTo.Value = rng.Value rngTo.Offset(1, 0).Value = rng.Offset(0, 1).Value '2 columns rngTo.Offset(2, 0).Value = rng.Offset(0, 2).Value '3 columns rngTo.Offset(3, 0).Value = rng.Offset(0, 3).Value '4 columns Set rngTo = rngTo.Offset(4, 0) 'number of rows per item Next rng End Sub -- AncientLearner ....never to old to learn something new |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 and 2000 and VBA Macro | Excel Programming | |||
Problems when using macro created in Excel 2000, in Excel 2003 | Excel Programming | |||
Run time error : Excel 2000 and Excel 2003 : different behavior of Macro | Excel Programming | |||
Macro error after switching from Excel 2000 to Excel 2003 | Excel Discussion (Misc queries) | |||
Macro written in Excel 2003 and saved as Excel 2000 .xls | Excel Programming |