Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetFile() method in VBA?
Message
De
07/08/2002 03:56:32
 
 
À
07/08/2002 01:10:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00686880
Message ID:
00686911
Vues:
35
Wes,

Here's some code I've been using in Excel that is similar to the GETFILE() function:
Dim lcFileName As String
    
lcFileName = Application.GetOpenFilename("FoxPro Tables (*.dbf), *.dbf", , "Select a table", "Select")
    
If lcFileName = "False" Then
  ' the user didn't select a file       
Else
  ' lcFileName contains the file selected by the user
  ' do whatever...
End If
HTH
>I have used the GetFile() function in Fox6. I used it in the context that when I click a button on my form the Open File Window appears so that the user can then select the file that they want. Then I read the path of what they chose into my database.
>
>I am trying to duplicate this in VBA in an Access application (before I get crushed for using Access, let it be known that I am helping a friend with this functionality, it is not my App). The research I have done points me in the direction of using the Get function in the FileSystemObject. Could someone please assist me in duplicating what I have done in Fox to VBA code in Access.
>
>TIA
>
>Wes
Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform