0

I am working on an access database, and want to create a button that will open up a file explorer, where a user can look for a file, and when they click it, the path will be saved.

To put the database in perspective, my company works with many vendors, and each of them sends us prices in different formats (pdf, excel, word, etc.). So I want the users of the database to be able to look up a vendor, and easily have access to their prices (some of which change quarterly, so it is easier to just change the file instead of putting the prices in the database and updating it there).

Any help would be greatly appreciated.

user3562355
  • 131
  • 1
  • 7

1 Answers1

0

Try this....

Sub sheet_dialogue_box()

Dim intChoice As Integer
Dim strPath As String


Application.FileDialog(msoFileDialogOpen).AllowMultiSelect = False

intChoice = Application.FileDialog(msoFileDialogOpen).Show

If intChoice <> 0 Then
    strPath = Application.FileDialog(msoFileDialogOpen).SelectedItems(1)
    Application.Workbooks.Open (strPath)
End If

End Sub
Ashwith Ullal
  • 263
  • 3
  • 10