Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: create "file browse" pop up box? (newbie question)

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    houston, tx
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    is there a way to utilize VB to prompt the user for a source file path/name and a destination file path/name? (ideally, the user would be able to "Browse..." from within the box.)

    thanks in advance,
    rs

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Posts
    75
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-24 09:05, ryansupak wrote:
    is there a way to utilize VB to prompt the user for a source file path/name and a destination file path/name? (ideally, the user would be able to "Browse..." from within the box.)

    thanks in advance,
    rs
    try something like this:

    Create a CommandButton and use this sort of code:

    Private Sub CommandButton1_Click()
    Dim Filter As String, Caption As String, SelectedFile As Variant

    Filter = "Fountains (*.xls),*.xls"
    Caption = "Please Select the Fountain of Youth"
    SelectedFile = Application.GetOpenFilename(Filter, , Caption)
    If SelectedFile = False Then Exit Sub

    Workbooks.Open SelectedFile

    Set SelectedFile = Nothing
    End Sub
    "Interfere? Of course we should interfere! Always do what you're best at, that's what I say!" -- The Doctor, Nightmare of Eden

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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