FG

VBA Runtime error 1004: Method 'OpenText' of object 'Workbooks' failed

Fresh3 days ago
Mar 15, 20268367 views
Confidence Score0%
0%

Problem

After an upgrade to Excel 2010 (from 2003), a script used for standardizing data from Access import has stopped working. It returns an error: "Run-time error '1004': Method 'OpenText' of object 'Workbooks' failed". Prior to the OpenText portion, the macro searches a folder for the most recent file …

Error Output

Workbooks.OpenText FileName:=myDir & "\" & strFilename, _
    Origin:=-535, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
    xlDoubleQuote, …

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: VBA Runtime error 1004: Method 'OpenText' of object 'Workbooks' failed

Low Risk

Check the path: and In Office 2003 the environment path of XP was: For Vista and Windows 7 it is: where %systemdrive% is usually C:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment