Open Text file with macro

G

Garry

In a macro running under Excel 2003, the following code was used to
open a text file:

Documents.Open Filename:=NMFiles, ReadOnly:=True, Visible:=True

NB: NMFiles is a variable with the file name and path assigned earlier

I upgraded to Office 2010 and no when I run the macro I receive an
error 429 (ActiveX component can't create object or return reference
to this object (Error 429). What is the cause of this error and what
is a solution for opening the text file?
 
D

David Sisson

When the errior occurs, is the line you posted highlighted? And will
it advance any if you hit F8?

The code looks fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top