I am having a problem using the Filter property of the common dialog control. When I try to add a filter, i get the following compile error "Invalid use of property"
Is there any reason for this? does the filter property have to be set in the Form_Load event?
This is what I have:

private Sub cmdOpenFile_Click()
on error resume next
CommonDialog1.Filter "FoxPro Programs (*.prg)|*.prg"
CommonDialog1.ShowOpen
me.txtFileName = CommonDialog1.FileName
me.lstPrgFiles.AddItem (CommonDialog1.FileName)
End Sub




Thanks!

~goddess
[email protected]