jalopez453
Registered User.
- Local time
- Yesterday, 18:34
- Joined
- Oct 11, 2016
- Messages
- 18
Hi everyone, I am having trouble formatting my csv file to text to column.
Below is my code and I am getting an error for the Destination:=Range("A1") stating,"sub or function not defined".
Below is my code and I am getting an error for the Destination:=Range("A1") stating,"sub or function not defined".
Code:
With xlApp
'delete row 1 and 2
.Rows("1:2").select
.Selection.Delete Shift:=xlUp
.Range("A1").select
.Range("A:A").select
.Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, _
1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12 _
, 1), Array(13, 1), Array(14, 1), Array(15, 1)), TrailingMinusNumbers:=True
.Range("A1").select
End With