Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Is there a way to test if a control exists on a userform?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Ryan H, post: 6441463"] I have a sub (ClearUserform) that is called by several userforms. Sometimes the control may not be on the userform passed to ClearUserform, thus I get an error. So I added the On Error Resume Next statement to quickly work around the error. Is there a way to test if the control exists on the userform passed to the sub. Sub MySub() Call ClearUserform(Userform1) End Sub Sub ClearUserform(MyForm As UserForm) On Error Resume Next MyForm.TextBox1 = "" ' i have other controls list here On Error GoTo 0 End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Is there a way to test if a control exists on a userform?
Top