problem using File Dialog API from mvps.org

  • Thread starter Thread starter ionic-fire
  • Start date Start date
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)
 
Either you have the same function saved in
two different modules, or you have the
module name the same as the function name.
 
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)
 
Back
Top