ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open a file from share (https://www.excelbanter.com/excel-programming/443391-open-file-share.html)

Maik[_2_]

Open a file from share
 
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

Jim Cone[_2_]

Open a file from share
 

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




"Maik"
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


All times are GMT +1. The time now is 03:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com