Is there a way to add a "Browse" button in an Input Box?

Using VBA in Outlook

Is there a way to add a "Browse" button in an Input Box?
Tom JohnstoneAsked:
Who is Participating?
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
Browse to a file?
Private Function get_user_specified_filepath() As String
    'or use the other code example here.
    Dim fd As Office.FileDialog
    Set fd = Application.FileDialog(msoFileDialogFilePicker)
    fd.AllowMultiSelect = False
    fd.Title = "Please select the file."
    get_user_specified_filepath = fd.SelectedItems(1)
End Function

Open in new window

https://stackoverflow.com/questions/25153342/open-a-workbook-using-filedialog-and-manipulate-it-in-excel-vba
0
 
Tom JohnstoneAuthor Commented:
Thank you sir,

It works great.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.