Search This Blog
Popular Posts
- List of KeyAscii in VB6.0
- List of VB Keycode in Visual Basic 6.0
- Enable and Disable Button VB6 code
- Check valid Email Address in PHP code
- Clear Textbox when Onclick HTML Javascript code
- Get the Filename and the extension of Filename Visual Basic 6.0
- Disable Right-Click of Website - HTML code
- Latest Plate Number with barcode in the Philippines
Get the Filename and the extension of Filename Visual Basic 6.0
Public Function getextension(filename As String) As String
For i = Len(filename) To 2 Step -1
c = Mid(filename, i, 1)
If c = "." Then
pos = i + 1
End If
Next
getextension = Mid(filename, pos, (Len(filename) + 1 - pos))
End Function
'Function to get filetitle from full path
Public Function getfiletitle(filename As String) As String
For i = Len(filename) To 2 Step -1
c = Mid(filename, i, 1)
If c = "\" Then
pos = i + 1
End If
Next
getfiletitle = Mid(filename, pos, (Len(filename) + 1 - pos))
End Function