Call the standard Windows File Open/Save dialog box

  • Thread starter Thread starter ryguy7272
  • Start date Start date
R

ryguy7272

I \tied to run the code here:
http://www.mvps.org/access/api/api0001.htm

I copied/pasted the code, and called it like this:

Private Sub Command0_Click()
Call TestIt
End Sub

I keep getting error messages. 'Compile Error: Invalid Outside Procedure'
This line is highlighted blue:
strFilter

What am I doing wrong?

Thanks,
Ryan---
 
ryguy7272 said:
I \tied to run the code here:
http://www.mvps.org/access/api/api0001.htm

I copied/pasted the code, and called it like this:

Private Sub Command0_Click()
Call TestIt
End Sub

I keep getting error messages. 'Compile Error: Invalid Outside Procedure'
This line is highlighted blue:
strFilter

What am I doing wrong?


You may have copied some code into the wrong place. The code you copied
into the module should begin with the "*** Code Start ***" comment and end
with the "*** Code End ***" comment. If you created a new module for this
purpose, that should be the only code in the module except for the "Option
Compare Database" and (ideally) "Option Explicit" lines at the very top of
the module.
 
I've been using VBA in Excel for a few years now; kind of new to VBA in
Access though. Sometimes I just freeze up when I'm in Access world. Anyway,
it's working now. Thanks guys!!
Ryan---
 
Back
Top