Open a file from share

M

Maik

Hello,

what is the best way to open a file from a share?

The following code will get the error 5: runtime error

rc = Shell("\\server\share\test.txt")

Thanks for your help

Maik
 
J

Jim Cone

Try...
rc = Shell("Notepad.exe " & """\\server\share\test.txt""", vbNormalFocus)
--
Jim Cone
Portland, Oregon USA
http://tinyurl.com/ExtrasXL




"Maik" <[email protected]>
wrote in message
Hello,
what is the best way to open a file from a share?
The following code will get the error 5: runtime error
rc = Shell("\\server\share\test.txt")
Thanks for your help
Maik
 

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