Oliver Dewar
Board Regular
- Joined
- Apr 17, 2011
- Messages
- 201
Hello MrExcel!
I have the following code in a macro:
I recorded this with the macro recorder - I now need to adapt the code so it automatically includes the right number of arrays for the csv info that may be being extracted.
This works fine for seven columns of info, but I have varying csv's.
How can I use a variable array in this sequence?
Cheers all.
I have the following code in a macro:
Code:
Range("BB9").TextToColumns Destination:=Range("BH1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1)), TrailingMinusNumbers:=True
I recorded this with the macro recorder - I now need to adapt the code so it automatically includes the right number of arrays for the csv info that may be being extracted.
This works fine for seven columns of info, but I have varying csv's.
How can I use a variable array in this sequence?
Cheers all.