Kens API and diff applications

S

Steven

strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xls)", "*.xls")

How would I make it so I can use the dropdown to be able to select:
All
Excel
Word Docs
CSV
TXT
PDF

Thank you,

Steven
 
P

pietlinden

Did you miss the sample?

Function TestIt()
Dim strFilter As String
Dim lngFlags As Long

'--EXAMPLES OF ADDING MULTIPLE FILTERS TO THE LIST....
strFilter = ahtAddFilterItem(strFilter, "Access Files (*.mda,
*.mdb)", _
"*.MDA;*.MDB")
strFilter = ahtAddFilterItem(strFilter, "dBASE Files (*.dbf)",
"*.DBF")
strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt)",
"*.TXT")
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")

' Since you passed in a variable for lngFlags,
' the function places the output flags value in the variable.
Debug.Print Hex(lngFlags)
End Function
 
S

Steven

Yes, I get so wound up and anxious that sometimes I dont read the entire
code ... I just copy it and go.

Thank you for the help.
 
C

Chris O''''Neill

Going back to your earlier message, you could also do this:

strFilter = ahtAddFilterItem(strFilter, "Steven's Stuff (Steven.*)",
"Steven.*")

Btw, this routine is good for alot of things besides opening or saving a
file. I use it to select a filename and path for e-mail attachments. Works
great!

Regards, Chris
 

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