Ask4Folder

Asks user for a folder, starting with certain folder

Function Ask4Folder(Optional StartIn = "")
 Dim FolderName As String
 If StartIn > "" Then ChDir StartIn
 With Application.FileDialog(msoFileDialogFolderPicker)
  .AllowMultiSelect = False
  .Show
  On Error Resume Next
  Ask4Folder = .SelectedItems(1)
  Err.Clear
  On Error GoTo 0
 End With
End Function

Parameters

StartIn

Views 148 Downloads 58

Perm link


ANmarAmdeen
280
File System VBA
Revisions

v1.0