Hi everybody !

Is there one (or more) of you who can tell me how to get the path of a file getting from the commondialog control : FileOpen ?

I try this, it doesn't get the path but the path and the filename. I only want the Path.

Thanks in advance.

Code:
Private Sub PathCommand_Click(Index As Integer)
    Dim File As Object, FilePath As String, FileToOpen As Object
    Set File = CreateObject("Scripting.FileSystemObject")   
    CommonDialog.DefaultExt = ".csv"
    CommonDialog.ShowOpen
    Set FileToOpen = File.GetFile(CommonDialog.FileName)
    FilePath = FileToOpen.Path
    Debug.Print FilePath
end sub
[Edited by (B2F)Tom on 07-27-2000 at 04:19 AM]