Results 1 to 5 of 5

Thread: file open prompt [RESOVLED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    71

    Resolved file open prompt [RESOVLED]

    how do i make the file open prompt appear and then Text1.Text become the path to the file they selected?
    Last edited by endusto; Feb 1st, 2006 at 04:40 PM.

  2. #2

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    71

    Re: file open prompt

    with the open file prompt

  4. #4
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: file open prompt

    put a commondialog on your form

    Code:
    Private Sub Command1_Click()
    
        With CommonDialog1
            .InitDir = "C:\Windows"
            .Filter = "Text Files|*.txt"
            .CancelError = True
            On Error GoTo UserCancelled
            .ShowOpen
            On Error GoTo 0
            Text1 = .FileName
        End With
    
    
    UserCancelled:
    
    End Sub
    VBCODE tags Kaput?
    Last edited by moeur; Feb 1st, 2006 at 04:34 PM.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    71

    Re: file open prompt

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width