You can use the common dialog control in VB.  Here is a code snippet that I use to allow the user to select an Access database.  I set the initial directory to get them close, but once the file open dialogue box is open, the user can navigate to other folders.  Once the user selects the file, I use the control.filename to open the file.

    CD1.Filter = "Access Databases (*.mdb)|*.mdb"
    CD1.DialogTitle = "Select a Database"
    CD1.InitDir = "c:\dma\data"
    CD1.ShowOpen
    If CD1.FileName <> "" Then
        strDbPath = CD1.FileName
    Else
        MsgBox "No File Selected"
        Exit Sub
    End If
    'strDbPath = "c:\dma\data\835s.mdb"
    ' Get initial timer value.
    lngTimer = Timer
    Set dbs = OpenDatabase(strDbPath)

Mitchell Sherry - Mid West Div. wrote:
Blank
Rather than having the name of the file hardcoded?
 
 
thanx, sherry
HCA Midwest Division IT&S
Applications Programmer/Analyst
816/823-0406

 


-- 
Neil Carman
Director Technical Development
Manigault & Associates LLC

http://www.m-allc.com
Work: (805) 680-5601
Fax:  (714) 968-5632

Reply via email to