open text file

C

Chris

hi

how can I open a text file with VBA to visual it

I use: call shell ("Name of the")

but it's not working

any ideas

thx
 
D

Dirk Goldgar

losmac said:
myFile = "C:\someTextFile.txt"
retVal = Shell("C:\Windows\Notepad.exe " & myFile)

Or, to avoid having to know where Notepad is installed, or in case the
user has some other application to edit text files:

Application.FollowHyperlink "C:\someTextFile.txt"
 

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