0

I have vba access code that open file dialog and select item in special folder , I want auto select all item in this folder

Dim dialog As FileDialog
Dim filePath As String
Dim fileName As String

Set dialog = Application.FileDialog(msoFileDialogFilePicker)

With dialog
    .AllowMultiSelect = True
    .InitialFileName = "D:\MyTest\"
    .Show
    If .SelectedItems.Count <> 0 Then
        filePath = .SelectedItems.Item(1)

        Me.imgp = filePath
    End If
End With
BigBen
  • 46,229
  • 7
  • 24
  • 40
Rozha Roz
  • 1
  • 4

0 Answers0