Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
Private Sub cmdClickToLocate_Click() Dim fDialog As Office.FileDialog Dim varFile As Variant Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog .AllowMultiSelect = False .Title = "Select the location of this client's pdf files." .Filters.Clear .Filters.Add "", "*.*" If .Show = True Then ' Loop through each file that is selected and then add it to the list box. For Each varFile In .SelectedItems Me.txtPDFfilePath = varFile Next Else MsgBox "You clicked Cancel in the file dialog box." End If End With End Sub
Join the community of 500,000 technology professionals and ask your questions.