Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Runtime error 1004 with method OpenText - but only on one computer

Has anyone an idea what I should do about the following? I have som
very simple code in Ms Excel which loads a tab-delimited file into
workbook. On my PC, this works fine. On the PC of the person for who
this project is intended, it results in a runtime error 1004, "metho
OpenText of object Workbooks failed". Our versions of Excel and Window
are identical.

MS Excel 2002, Windows 2000 professional 5.0.2195 SP4

The line which gives the runtime error is as follows:
Application.Workbooks.OpenText FileName:=vK_infile(1)
FieldInfo:=Array(Array(1, xlTextFormat)), _
DataType:=xlDelimited, Tab:=True

I've tried a lot of fiddly changes including taking out all of th
papameters to OpenText which were unnecessary, adding i
"Application.Workbooks" instead of just "Workbooks", changing vK_infil
from a string to an array of one string, and putting additional arra
elements into FieldInfo to match up with the fileds 2 to 14. Nothin
made a difference.

The text file itself is pure vanilla. And invariably, doing the impor
by hand using the dialog boxes works fine, from whoseever computer.

Any ideas?

Regards - Ke

--
Message posted from http://www.ExcelForum.com

Reply
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
Method 'MacroOptions' of object'_Application' failed Runtime Error 1004 EagleOne Excel Discussion (Misc queries) 1 October 22nd 14 05:49 PM
Runtime Error 1004 - Method Range of '_Global failed' Sworkhard Excel Programming 3 July 9th 04 04:20 AM
RUNTIME ERROR '1004' --- Select method of worksheet class failed jawee Excel Programming 2 April 30th 04 06:47 AM
runtime error '1004' delete Method of Range Class Failed Tom Kennedy Excel Programming 0 April 14th 04 08:08 PM
runtime error '1004' delete Method of Range Class Failed Tom Ogilvy Excel Programming 0 April 1st 04 04:09 AM


All times are GMT +1. The time now is 05:39 AM.

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

About Us

"It's about Microsoft Excel"