Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Method 'MacroOptions' of object'_Application' failed Runtime Error 1004 | Excel Discussion (Misc queries) | |||
Runtime Error 1004 - Method Range of '_Global failed' | Excel Programming | |||
RUNTIME ERROR '1004' --- Select method of worksheet class failed | Excel Programming | |||
runtime error '1004' delete Method of Range Class Failed | Excel Programming | |||
runtime error '1004' delete Method of Range Class Failed | Excel Programming |