Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Default Path
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00404265
Message ID:
00404338
Views:
14
>How could I set a default path for the VB6 application?
>Or how could I get the current directory that the application is
>running? As I encounter error when opening a .mdb database,
>because I didn't specify the path. Which I don't want to hard
>code the database path. Any advise, thanks.
lcCurPath = Curdir   'Current Path
lcAppPath = App.Path 'Application Path
lcAppDrive = Left$(lcPath, 2)
ChDrive lcDrive      'Change to application drive
ChDir lcPath         'Change to application directory
George
Previous
Reply
Map
View

Click here to load this message in the networking platform