|
-
Apr 22nd, 2015, 02:17 PM
#1
Thread Starter
Member
How to check type of control not included in the tool box?
I have put the subs and functions that I use the most in a standard module.
Including this:
Sub ReadArrayIntoTextBox(anArray() As String, objTextBox As Control)
If (Not TypeOf objTextBox Is TextBox) And (Not TypeOf objTextBox Is RichTextBox) Then Exit Sub
................
End Sub
The program works fine, because this Sub is never called.
But the project will not compile because there is no RichTextBox control in the tool box.
Is there a way to assign type of control to a variable, something like:
sType = TypeOf (objTextBox)
Appreciate help.
Tags for this Thread
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
|