Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drive letter error
Message
De
10/01/2007 11:17:07
 
 
À
10/01/2007 11:10:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01184226
Message ID:
01184229
Vues:
17
>i have the following code
>
>tmpsheet = getobject('','excel.sheet')
>xlapp = tmpsheet.application
>xlapp.visible = .t.
>xlapp.workbooks.open(filename_)
>
>filename_ is '\pinktemp\61332206.xls' gives me an OLE error as File Not Found
>
>but if i give the drive letter 'e:\pinktemp\61332206.xls' then it is works just fine.
>
>my default has been already set as the E drive, so where is it actually looking and how do i make it work without actually specifying the drive letter.

Try storing default drive letter in a variable and building the full path from that?

lcFilename = lcDefDrive + "\pinktemp\61332206.xls"
...
xlapp.workbooks.open( lcFilename)
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform