Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Default Path
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00404265
Message ID:
00404338
Vues:
15
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform