by Sean (2 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 20th December 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
get the path to a file
Sub FindFilePath()
strValue = "C:\Test\Test\Temp\Bin\X\WW\QQQQQQQQQQ"
Temp = Len(strValue)
Temp1 = Temp
charValue = Right(strValue, 1)
Do While charValue <> "\"
charValue = Right(FileName, 1)
FileName = Left(strValue, Temp)
Temp = Temp - 1
Debug.Print FileName
Loop
Stop
FilePath = FileName & "\"
MsgBox FilePath
End Sub