VBA Excel - Compile Error: Out of Memory

L

Linda G

When recording a macro to open a delimited text file,
(approx 230 rows and 54 columns) the macro records and
opens ok, but on running the macro, the error 'Compile
Error: Out of Memory' comes up and the debugger stops
at "Array(40, 1)".

Any ideas? (Code below).

Workbooks.OpenText FileName:= _
"C:\My Documents\Exchange Files\Targets",
Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=True, Comma:=False _
, 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), Array(8, 1), Array(9, 1), _
Array(10, 1), Array(11, 1), Array(12, 1), Array
(13, 1), Array(14, 1), Array(15, 1), Array( _
16, 1), Array(17, 1), Array(18, 1), Array(19, 1),
Array(20, 1), Array(21, 1), Array(22, 1), _
Array(23, 1), Array(24, 1), Array(25, 1), Array
(26, 1), Array(27, 1), Array(28, 1), Array( _
29, 1), Array(30, 1), Array(31, 1), Array(32, 1),
Array(33, 1), Array(34, 1), Array(35, 1), _
Array(36, 1), Array(37, 1), Array(38, 1), Array
(39, 1), Array(40, 1), Array(41, 1), Array( _
42, 1), Array(43, 1), Array(44, 1), Array(45, 1),
Array(46, 1), Array(47, 1), Array(48, 1), _
Array(49, 1), Array(50, 1), Array(51, 1), Array
(52, 1), Array(53, 1), Array(54, 1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top