It has been more than a decade since I last used VB6. Unfortunately, I don't have a copy that I can use to test my solution.
I believe that the following will retrieve the path to the executing program:
App.Path
From this string, you should be able to extract either the drive letter or the UNC path (if the program is run from a file server).
I found the following on the
MSDN web site[
^]. It shows how
App.Path
is used to get the path of the executing program.
The following example demonstrates how to display an image file that is stored in the application's folder by retrieving the path to the executing application.
' Visual Basic 6.0
Picture1.Picture = LoadPicture(App.Path & "\Logo.jpg")