Call the standard Windows File Open/Save dialog box

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---
 
D

Dirk Goldgar

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.
 
R

ryguy7272

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---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top