File open

D

Douglas J. Steele

Not sure exactly what you're asking for.

If you look at the 4 line example at the top of the page, strInputFileName
contains the complete path to the file you've selected.

Do you only want the path out of that? You can use:

Left$(strInputFileName, Len(strInputFileName) - Len(Dir$(strInputFileName)))

or you can use the InStrRev function to find the last \ in strInputFileName:

Left$(strInputFileName, InStrRev(strInputFileName, "\") - 1)
 
G

Guest

Thanks
its working

Alvin


Douglas J. Steele said:
Not sure exactly what you're asking for.

If you look at the 4 line example at the top of the page, strInputFileName
contains the complete path to the file you've selected.

Do you only want the path out of that? You can use:

Left$(strInputFileName, Len(strInputFileName) - Len(Dir$(strInputFileName)))

or you can use the InStrRev function to find the last \ in strInputFileName:

Left$(strInputFileName, InStrRev(strInputFileName, "\") - 1)
 

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