A
AncientLearner
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")End With
Set rngTo = Sheets("sheet2").Range("A1")
For Each rng In rngFrom
rngTo.Value = rng.Value
rngTffset(1, 0).Value = rng.Offset(0, 1).Value '2 columns
rngTffset(2, 0).Value = rng.Offset(0, 2).Value '3 columns
rngTffset(3, 0).Value = rng.Offset(0, 3).Value '4 columns
Set rngTo = rngTffset(4, 0) 'number of rows per item
Next rng
End Sub
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")End With
Set rngTo = Sheets("sheet2").Range("A1")
For Each rng In rngFrom
rngTo.Value = rng.Value
rngTffset(1, 0).Value = rng.Offset(0, 1).Value '2 columns
rngTffset(2, 0).Value = rng.Offset(0, 2).Value '3 columns
rngTffset(3, 0).Value = rng.Offset(0, 3).Value '4 columns
Set rngTo = rngTffset(4, 0) 'number of rows per item
Next rng
End Sub