Excel 2002
On a userform I have some Textboxes, listboxes, etc that I want to set .value=empty
Currently I do it by
'clear some values
Code:
TSEFAN.Value = empty
TSEFPD.Value = empty
TSEFAP.Value = empty
Now I have tried,
Code:
Sub controlempty(formname As MSForms)
'pass form name to use
Dim cCont As Control
For Each cCont In formname
.Value = Empty
Next cCont
End Sub
then in the code for saving the data I have the line
Code:
controlempty ADDCORT
ADDCOURT is the name of the form
get error "Expected user-defined type, not project"
Help Thanks