vb6.0 取得文件扩展名

Function GetFileExt(Filename As String) 
Dim TMP1, TMP2 
TMP1 = Split(Filename, ".") 
If UBound(TMP1) <> 0 Then 
    TMP2 = Split(TMP1(UBound(TMP1)), "\") 
    If UBound(TMP2) = 0 Then 
        GetFileExt = TMP1(UBound(TMP1)) 
    End If 
End If 
End Function 

 

你可能感兴趣的:(vb)