I use the filedialog to select a file and return a filename. See code below.
I expected my use of the the ButtonName property to change the caption on the action button from the default "Open" to "Select", but that don't happen. The code runs without any errors. Is there something I have misunderstood? Appreciate any tips.
Dim fd As Object
Set fd = Application.FileDialog(3) '3 = filepicker
.Title = "Velg en fil"
.ButtonName = "Select"
.AllowMultiSelect = False
' Clear out the current filters, and add our own.
.Filters.Add "Word dokument", "*.doc"
.Filters.Add "PDF filer", "*.pdf"
.Filters.Add "Alle Filer", "*.*"
.InitialFileName = "D:\Temp\"
If .Show = True Then
MsgBox "file choosen = " & f.SelectedItems(1)
MsgBox "You clicked Cancel in the file dialog box."
Set fd = Nothing