Consulting

Results 1 to 3 of 3

Thread: BrowseForFolder options ? (0, "Select folder", 512)

  1. #1

    BrowseForFolder options ? (0, "Select folder", 512)

    Hey guys,

    I am looking at using this code but was wondering if there was a way to set it to some initial folder/directory location, is this an option? Thanks.

    [VBA]
    Dim oApp As Object
    Dim oFolder As Variant
    Set oApp = CreateObject("Shell.Application")
    'Browse to the folder
    Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
    If Not oFolder Is Nothing Then
    MsgBox "You select this folder : " & oFolder.Self.Path
    End If
    [/VBA]
    My {Tube Amp} Building Forum
    http://www.dreamtone.org/Forum/

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    With Application.FileDialog(msoFileDialogFolderPicker)

    .InitialFileName = "C:\test"
    If .Show = -1 Then

    MsgBox .SelectedItems(1)
    End If
    End With
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks bud!
    My {Tube Amp} Building Forum
    http://www.dreamtone.org/Forum/

Posting Permissions

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