Am getting an 'object variable or With block variable not set' error on below part of my code to transpose a column of data in Excel. The error is happening on this line:
.Range("D1").Select
Any ideas what I'm doing wrong? Thank you.
With xSheet
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
.Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End With
.Range("D1").Select
Any ideas what I'm doing wrong? Thank you.
With xSheet
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
.Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End With