Last week an expert helped me with code that would allow the user to browse for a file. But the Access database is an mdb file. When I click on the [Select file] command button on the menu I get an error:
Compile Error: Can't find project or library.
Here's the code: Can someone help?
Private Sub cmdSelectFile_Click()
Dim fd As FileDialog, SelectFolderOrFile
Set fd = Application.FileDialog(msoFileDialogFilePicker)
.InitialFileName = Environ("userprofile") & "\Documents\"
If .Show Then
Me.txtFileName = .SelectedItems(1)