Greetings,
I am attempting to display the File Open dialog in MS Access (which I've never done before), and am having problems with the following line of code (which I have placed in a Class module):
Private Type OPENFILENAMElStructSize As LonghwndOwner As LonghInstance As LonglpstrFilter As StringlpstrCustomFilter As StringnMaxCustFilter As LongnFilterIndex As LonglpstrFile As StringnMaxFile As LonglpstrFileTitle As StringnMaxFileTitle As LonglpstrInitialDir As StringlpstrTitle As StringFlags As LongnFileOffset As IntegernFileExtension As IntegerlpstrDefExt As StringlCustData As LonglpfnHook As LonglpTemplateName As String
End Type
I keep receiving the error, "Expected: End of statement", when I attempt to compile that class module. I copied the code directly from an article outlining how to display the File Open dialog. The article I am referencing is entitled, "Display Open and Save As Dialog Boxes in Access with API Functions" on the MSDN web site.
At any rate, can anyone tell me what I am doing wrong? Secondly, is there no other way of displaying the "File Open" dialog in Access? In Excel, all I would need is the following line of code:
Application.Dialogs(xlDialogOpen).Show
Thanks in advance!
I am attempting to display the File Open dialog in MS Access (which I've never done before), and am having problems with the following line of code (which I have placed in a Class module):
Private Type OPENFILENAMElStructSize As LonghwndOwner As LonghInstance As LonglpstrFilter As StringlpstrCustomFilter As StringnMaxCustFilter As LongnFilterIndex As LonglpstrFile As StringnMaxFile As LonglpstrFileTitle As StringnMaxFileTitle As LonglpstrInitialDir As StringlpstrTitle As StringFlags As LongnFileOffset As IntegernFileExtension As IntegerlpstrDefExt As StringlCustData As LonglpfnHook As LonglpTemplateName As String
End Type
I keep receiving the error, "Expected: End of statement", when I attempt to compile that class module. I copied the code directly from an article outlining how to display the File Open dialog. The article I am referencing is entitled, "Display Open and Save As Dialog Boxes in Access with API Functions" on the MSDN web site.
At any rate, can anyone tell me what I am doing wrong? Secondly, is there no other way of displaying the "File Open" dialog in Access? In Excel, all I would need is the following line of code:
Application.Dialogs(xlDialogOpen).Show
Thanks in advance!