Windows XP, Access 2003, neophyte Access programmer
When writing VBA in Excel, pressing F5 would run the procedure where the cursor was located. In Access it opens a menu and asks which procedure I want to run. Although I have saved the procedure, it does not show up in the menu.
How do I just run the procedure I am editing?
How do I add my procedure to <something/somewhere> so it will show up in the list of functions to run?
Second, and I don't know if this is related:
I copied this code fragment directly from the VBA help function to start up a file open dialog box and put it in the click event for a button:
Code:
Private Sub btnImportData_Click()
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog( _
FileDialogType:=msoFileDialogOpen)
With dlgOpen
.AllowMultiSelect = True
.Show
End With
End Sub
When I try to run it Access pops up a dialog error box that says:
User-defined type not defined
This is right from the help function. FileDialog is not my data type, it should be already defined. What do I need to get an open file dialog box?
Thank you for your time.