I have (an inherited !) VB script with the Workbooks.OpenText command in it. On one machine it opens the file nicely and puts the data into the columns correctly, on another all the data just goes into one column. I'm guessing this is either due to a Global PC or Excel setting - can anyone shed any light on where I might compare the two PCs.
Line of code is here:
Workbooks.OpenText FileName:=INFWorkBookToOpen, Origin:= _
xlMSDOS, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1) _
, Array(23, 1), Array(38, 1), Array(50, 1), Array(63, 1), Array(74, 1), Array(90, 1), Array( _
100, 1), Array(123, 1), Array(148, 1), Array(172, 2), Array(194, 2), Array( _
211, 1), Array(250, 1), Array(260, 1), Array(273, 1), Array(290, 1), Array(314, 1), Array( _
326, 1)), TrailingMinusNumbers:=True
Line of code is here:
Workbooks.OpenText FileName:=INFWorkBookToOpen, Origin:= _
xlMSDOS, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1) _
, Array(23, 1), Array(38, 1), Array(50, 1), Array(63, 1), Array(74, 1), Array(90, 1), Array( _
100, 1), Array(123, 1), Array(148, 1), Array(172, 2), Array(194, 2), Array( _
211, 1), Array(250, 1), Array(260, 1), Array(273, 1), Array(290, 1), Array(314, 1), Array( _
326, 1)), TrailingMinusNumbers:=True