Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does the Filter works?

Status
Not open for further replies.

kruxty

Programmer
Jul 17, 2001
197
PT
I have a CommonDialog and i neet to put a filter on it to filter some files!
How is the correct syntax to do it!

Tkx ;o)
 
CommonDialog1.Filter = "Access Files (*.mdb)| *.mdb" David Paulson

 
Private Sub Cmd_Origem_Click()
On Error GoTo E_Cmd_Origem_Click

Dim parte As String

Cmdial_orig.FileName = "*.vbp"
Cmdial_orig.Flags = cdlOFNHideReadOnly
Cmdial_orig.Filter = "All Files (*.*)|*.*|Text Files" & _
"(*.txt)|*.txt|"
Cmdial_orig.ShowOpen
Text1.Text = Cmdial_orig.FileName

parte = Right(Text1.Text, 3)

If parte <> &quot;vbp&quot; Then
MsgBox &quot;O ficheiro seleccionado tem de ser *.vbp .&quot; _
, vbExclamation, &quot;Atenção&quot;
Text1.Text = &quot;Escolha a directoria de origem.&quot;
End If


If Text1.Text <> &quot;Escolha a directoria de origem.&quot; And Txt_Dest.Text <> &quot;Escolha a directoria de destino.&quot; Then
Cmd_Executar.Enabled = True
Mnu_Executar.Enabled = True
End If
Exit Sub

E_Cmd_Origem_Click:
ErrHandle &quot;Cmd_Origem_Click&quot;
ErrDisplay
Exit Sub
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top