|
-
Mar 19th, 2008, 09:27 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] How to get the filename
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
-
Mar 19th, 2008, 09:27 AM
#2
Re: How to get the filename
Do you want PNT or PNT.TIN?
-
Mar 19th, 2008, 09:28 AM
#3
Thread Starter
Frenzied Member
Re: How to get the filename
I want to get "PNT" only.
-
Mar 19th, 2008, 09:33 AM
#4
Re: How to get the filename
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
-
Mar 19th, 2008, 09:38 AM
#5
Thread Starter
Frenzied Member
Re: How to get the filename
It work, Thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|