File Filter Dilemma - *Resolved*
Hey guys, I have a small problem. I want to show the Open DialogBox, but have the default file filter be set to "All Image Files", and have it showing files of the type bmp, jpg, jpeg, and gif.
I have the following code, but it doesn't work. It displays the correct text ("All Image Files (*.bmp), (*.jpg), (*.jpeg), (*.gif)" in the drop-down on the dialogbox, however, creates several blank text entry's below it, each which are one of the filters.
How can I have it so that the default filter is All Image Files, and show the types of files listed above?
VB Code:
Dim sFileFilter As String
sFileFilter = "All Image Files (*.bmp), (*.jpg), (*.jpeg), (*.gif)|*.bmp| |*.jpg| |*.jpeg| |*.gif|"
With CommonDialog2
.Filter = sFileFilter
' Some other flags and such are here
.ShowOpen
' Some other code related to my program is here
End With