View Full Version : Solved: File Extension Filtering
mphill
10-20-2008, 01:36 PM
I searched the forums but did not find a similar topic. I am using the common dialog box and trying to filter for files with a *.btb and *.wss extension. The dialog box still shows all the files and folders in that directory. Am I using the incorrect syntax for this filter?
With cdbDialog
.Filter = "*.btb, *.wss"
.ShowOpen
End With
jfournier
10-20-2008, 01:50 PM
This should work:
.Filter = "btb(*.btb)" & vbNullChar & "*.btb" & vbNullChar & "wss(*.wss)" & vbNullChar & "*.wss"
mphill
10-20-2008, 01:58 PM
Thanks for the quick response. It still displayed files with extensions other than those two.
Here is what I ended up using. Not quite what I wanted but it should work.
.Filter = "Blue Tops (*.btb)|*.btb|Wyoming Slope Stakes (*.wss)|*.wss"
shamsam1
10-20-2008, 10:24 PM
.Filter ="Blue Tops/Wyoming Slope Stakes(*.btp;*.wss)|*.btp;*.wss;"
mphill
10-21-2008, 07:27 AM
That is what I needed. Thanks shamsam1.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.