Discussion:
open file from subdirectory
(too old to reply)
K
2011-09-01 18:11:30 UTC
Permalink
Hi all, I am looking for VB.NET code (not VB6 code) which should look
for file name "526366.xlsx" in all subfolders under folder "C\data"
and then it should show message if it cant find the file like "sorry
file not found" and if it finds the file then it should open it.
Please can any friend help me on this.
Onur Güzel
2011-09-04 16:06:28 UTC
Permalink
Hi all,  I am looking for VB.NET code (not VB6 code) which should look
for file name "526366.xlsx" in all subfolders under folder "C\data"
and then it should show message if it cant find the file like "sorry
file not found" and if it finds the file then it should open it.
Please can any friend help me on this.
Use File.Exists, then if it returns True, use Process.Start(...) and
launch the file, else use Msgbox("....") to warn user that the file
doesn't exist.

HTH.

Onur

Loading...