G
Guest
When I pass my Excel file to co-worker & they execute the macro, code failed
with pop up "Compile Error In Hidden Module : Module1".
To verify, I performed the same action in others PC & recorded macro along
the actions. The below differences were discovered. What have I done wrong?
(VBA Rookie)
(a) Macro recorded with my laptop using Excel 2003:
ChDir "C:\Highway"
Workbooks.OpenText Filename:="C:\Highway\B2EDIT.txt.out", Origin:=-536, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=True, OtherChar:="|",
FieldInfo:=Array(Array(1, 4 _
), 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)), TrailingMinusNumbers:=True
(b) Macro recorded with OTHER PC using Excel 2000 & also Excel 2003 (which
is same with mine):
ChDir "C:\Highway"
Workbooks.OpenText Filename:="C:\Highway\B2EDIT.txt.out",
Origin:=xlWindows _
, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=True, OtherChar:="|",
FieldInfo:=Array(Array(1, 4 _
), 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))
with pop up "Compile Error In Hidden Module : Module1".
To verify, I performed the same action in others PC & recorded macro along
the actions. The below differences were discovered. What have I done wrong?
(VBA Rookie)
(a) Macro recorded with my laptop using Excel 2003:
ChDir "C:\Highway"
Workbooks.OpenText Filename:="C:\Highway\B2EDIT.txt.out", Origin:=-536, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=True, OtherChar:="|",
FieldInfo:=Array(Array(1, 4 _
), 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)), TrailingMinusNumbers:=True
(b) Macro recorded with OTHER PC using Excel 2000 & also Excel 2003 (which
is same with mine):
ChDir "C:\Highway"
Workbooks.OpenText Filename:="C:\Highway\B2EDIT.txt.out",
Origin:=xlWindows _
, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=True, OtherChar:="|",
FieldInfo:=Array(Array(1, 4 _
), 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))