Home General VB/VBA Get Pathname From File
23 | 02 | 2012
Main Menu
Search
Paypal Donation
So we can continue and expand this site
Content View Hits : 469529
Get Pathname From File PDF Print E-mail
User Rating: / 0
PoorBest 
Tutorials
Written by Administrator   

You have a filepath including the filename but you only need the path without the name. The path can be 

"getpathname"

View source
Function GetPathName(strFile As String) As String
 
 
	'return the path for a file (folder only)
 
	Dim fso
 
	Set fso = CreateObject("Scripting.FileSystemObject")
 
	GetPathName = fso.GetParentFolderName(strFile)
 
	End Function
 
 

Add comment


Security code
Refresh

Advertising

LOGON
Sponsored Links