Or, one more option.

Code:
Private Sub Command1_Click()
    Dim fs As Object
    Set fs = CreateObject("Scripting.FileSystemObject")
    MsgBox fs.GetBaseName("c:/extension.txt")
End Sub