A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro error opening text file



 
 
Thread Tools Display Modes
  #1  
Old November 6th, 2009, 04:05 PM posted to microsoft.public.excel.misc
Jim C
external usenet poster
 
Posts: 15
Default Macro error opening text file

I built the following macro on Excel 2003 SP2, It ran on 2 other network
computers running Excel 2000 until just recently, one computer was replaced
and the other had no changes. I can run it from the working computer from
the same netrwork folder as the non-working computers. It used to work on
the non-working computers so I am confused.

I get a Visual Basic error "Compile error: Named argument not found". The
last argument in the macro code "TrailingMinusNumbers:=" is highlighted, the
following "true" is not highlighted.

Here is the full macro:

Sub FK_open_Q5()
'
' FK_open_Q5 Macro
' Macro recorded 9/22/2008 by
'
' Keyboard Shortcut: Ctrl+Shift+Q
'
ChDir "H:\Public\DDMS Reports"
Workbooks.OpenText Filename:="H:\Public\DDMS Reports\Q5-QUOTE.TXT",
Origin _
:=437, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote _
, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:= _
False, Space:=False, Other:=True, OtherChar:="|", FieldInfo:=Array( _
Array(1, 1), Array(2, 2), Array(3, 1), Array(4, 1), Array(5, 1),
Array(6, 1), Array(7, 1), _
Array(8, 2), Array(9, 1), Array(10, 1), Array(11, 2), Array(12, 1),
Array(13, 1), Array(14, _
1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 2),
Array(19, 2), Array(20, 1), _
Array(21, 2), Array(22, 1), Array(23, 2), Array(24, 1), Array(25,
1), Array(26, 1), Array( _
27, 1), Array(28, 1)), TrailingMinusNumbers:=True
End Sub

Thanks for any help
--
Jim C
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.