Opentext array error

J

john

I recorded this Macro but get a Compile Error: "Out of memory" when I try to
run it from code.
If I decrease the number Arrays it goes away but does not deal with all the
text.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/4/2006 by John Thomas
'

'
Workbooks.OpenText FileName:= _
"C:\Documents and Settings\John Thomas\My Documents\New
Business\032406c_dat.txt" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:= _
Array(Array(0, 1), Array(12, 1), Array(60, 1), Array(61, 1),
Array(76, 1), _
Array(118, 1), Array(160, 1), Array(188, 1), Array(190, 1),
Array(200, 1), _
Array(202, 1), Array(210, 1), Array(224, 1), Array(224, 1),
Array(233, 1), _
Array(235, 1), Array(239, 1), Array(240, 1), Array(248, 1),
Array(252, 1), _
Array(253, 1), Array(261, 1), Array(265, 1), Array(266, 1),
Array(274, 1), _
Array(316, 1), Array(317, 1), Array(359, 1), Array(387, 1),
Array(389, 1), _
Array(394, 1), Array(398, 1), Array(402, 1), Array(403, 1),
Array(445, 1), _
Array(487, 1), Array(515, 1), Array(517, 1), Array(522, 1),
Array(526, 1), _
Array(530, 1), Array(534, 1), Array(535, 1), Array(577, 1),
Array(619, 1), _
Array(647, 1), Array(649, 1), Array(654, 1), Array(658, 1),
Array(662, 1), _
Array(666, 1), Array(667, 1), Array(709, 1), Array(751, 1),
Array(779, 1), _
Array(781, 1), Array(786, 1), Array(790, 1), Array(794, 1),
Array(798, 1), _
Array(799, 1), Array(841, 1), Array(883, 1), Array(911, 1),
Array(913, 1), _
Array(918, 1), Array(922, 1), Array(926, 1), Array(930, 1),
Array(931, 1), _
Array(973, 1), Array(1015, 1), Array(1045, 1), Array(1050, 1),
Array(1054, 1), _
Array(1058, 1), Array(1062, 1), Array(1063, 1), Array(1105, 1),
Array(1147, 1), _
Array(1175, 1), Array(1177, 1), Array(1182, 1), Array(1186, 1),
Array(1190, 1))


End Sub
 

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