LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default macro problems

I wrote a macro with Excel 2002 on Windows XP. It runs fine. It uses the
Insert External data command to import a tab-delimited file into a
pre-formatted excel workbook.

However, when I load the worksheet (with the macro) on a Win98 second
edition platform running Excel 2000, I get the following error message:

Error 5: Invalid procedure, call or argument.

This occurs at the line: TextFilePlatform = 1252

I'm not sure if this is an Excel 2000 issue or a platform issue.


The full macro is:

Import_roster Macro
' Macro recorded 6/3/2004 by John A. Garate
'

'
Sheets("Roster").Select
Range("B3").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;F:\Lectors\Tab files\roster.tab", Destination:=Range("B3"))
.Name = "roster"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 1252
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierNone
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub





--
John Garate



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro problems Father John Excel Discussion (Misc queries) 3 April 20th 10 11:24 PM
Problems with macro fieldsy73 Excel Discussion (Misc queries) 1 February 26th 07 03:04 AM
Macro problems Heine Excel Worksheet Functions 9 October 31st 06 11:01 AM
Macro problems Shorty Excel Programming 0 November 11th 04 04:24 PM
various macro problems legepe[_12_] Excel Programming 0 October 23rd 04 11:07 PM


All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"