open file from subdirectory

  • Thread starter Thread starter K
  • Start date Start date
K

K

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.
 
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
 
Back
Top