Select a folder

Allows user to choose a folder
Shows the user a familiar ‘explorer’ type dialogue box
Allows the use of a ‘start’ folder
Author: michael@excelexperts.co.uk

Public Function BrowseFolder(sTitle As String, Optional OpenAt As String) As String

    Dim lCount As Long

    BrowseFolder = vbNullString

    With Application.FileDialog(msoFileDialogFolderPicker)
        .Title = sTitle
        .InitialFileName = OpenAt
        .Show
        For lCount = 1 To .SelectedItems.Count
            BrowseFolder = .SelectedItems(lCount)
        Next lCount
    End With

End Function

Address

Brookfield,
55 Heath Drive
Brookwood, Surrey
GU24 0HQ England

Scroll to Top