I have textbox with file location
C:\Documents and Settings\fauzul\Desktop\PSM\Final\PNT.TIN.
How to get the filename only without extension?
I want to get PNT only
Printable View
I have textbox with file location
C:\Documents and Settings\fauzul\Desktop\PSM\Final\PNT.TIN.
How to get the filename only without extension?
I want to get PNT only
Do you want PNT or PNT.TIN?
I want to get "PNT" only.
Code:Private Sub Command1_Click()
Dim arrFileName() As String
Dim arrFile() As String
Dim strFileName As String
strFileName = "C:\Documents and Settings\fauzul\Desktop\PSM\Final\PNT.TIN"
arrFileName = Split(strFileName, "\")
'MsgBox arrFileName(UBound(arrFileName))
arrFile = Split(arrFileName(UBound(arrFileName)), ".")
MsgBox arrFile(0)
End Sub
It work, Thank you :wave: