|
-
November 29th, 2011, 09:36 AM
#1
Error in Module
Hi,
I created a Fuction in the module in order to clear all textboxes in a form.
The clear button does work but it still displays an error at the bottom saying :
Expression is of type ........., which is not a collection type.
Can anyone help me with this ?
Thanks
-
November 29th, 2011, 11:21 AM
#2
Re: Error in Module
Not without seeing what you did, what you've tried, the error line in question, etc. If you want help, use CODE TAGS and post your code.
-
December 9th, 2011, 03:28 PM
#3
Re: Error in Module
Code:
Private Sub ClearTextControls()
Dim ctl As Control
For Each ctl In Form1 ' loop all controls on Form1
If TypeOf ctl Is TextBox Then ' If the control is a TextBox
ctl.Text = vbNullString ' set its value to null
End If
Next ctl
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|