Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening folders from a complete route 1

Status
Not open for further replies.

jmc014

Technical User
Nov 24, 2007
80
0
0
ES
Hi,

I would like to know if it is possible to open a folder from the compete route where my file is located.

I have a txtbox called NDC_Link which holds the entire location of my file.
NDC_Link = C:\Users\My_Computer\Desktop\My Folder\001001-0001-000000002183008.par.pdf

By using the below, and without too mush stress, I can open the .PDF file. But I would like to open the "My Folder" without having to open the PDF file itself.

File_Location = Forms!Pantalla_Principal!IMO5!Entrada_de_Datos_IMO5_Subform!NDC_Link
Shell "C:\WINDOWS\explorer.exe """ & File_Location & "", vbNormalFocus

Does anyone know if there is a code that can do this?

Thanks,
jmc014






 
Shell "C:\WINDOWS\explorer.exe """ & Left(File_Location, InStrRev(File_Location, "\")) & """", vbNormalFocus

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top