problem using File Dialog API from mvps.org

I

ionic-fire

I use Access 2003.

I am currently developing an access database and I wish to incorporate a File-
SaveAs dialog box. Since the built-in Access Application.FileDialog has
issues, I found some API code in the API section at MVPS.org which I pasted
into a new module and saved it. From the searching that I have done, people
appear to think highly of this code.

My problem is when I try to invoke it, VBE gives me an error saying "Compile
error: Ambiguous name detected: ahtAddFilterItem".

I do not understand why it spits back this error. The help file seems
ambiguous and I do not understand what it is telling me either. Can anyone
offer some insight? Thank you.

Here is my calling code, which refers to code I saved into a module:

'Ask for SaveFileName
strFilter = ahtAddFilterItem(myStrFilter, "Excel Files (*.xls)", "*.xls")
strSaveFileName = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strFilter, _
DefaultExt:=xls, _
Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
 
D

DAVID

Either you have the same function saved in
two different modules, or you have the
module name the same as the function name.
 
I

ionic-fire via AccessMonster.com

Overnight, I actually had a thought that I might have another identical
function in a separate module. Indeed, when I checked that is what I found.
Thanks!! Problem solved.
Either you have the same function saved in
two different modules, or you have the
module name the same as the function name.
I use Access 2003.
[quoted text clipped - 20 lines]
DefaultExt:=xls, _
Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY)
 

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