I have this VB exe file in any given folder. When I execute it, I want for it to store the path in which it is saved.

And also, I only want the path... I do NOT want the path + filename.

I tried using CurDir, but that only returns the default path for Visual Basic.

Example:


Private Sub cmdCurrentPath_Click()

MsgBox "The current path is: " + CurDir

End Sub

The message box will always say : C:\VC6\VB98

Thanks.