Hello!!!
I have created a class sub procedure to clear textboxes in any form but I
can't seem to compile my class library. The error always keeps me from
compiling.
Here are the codes:
VB Code:
Public Shared Sub ClearTextboxes(ByVal AutoForms As Form, ByVal StartText As Integer, ByVal EndText As Integer) Dim Start As Integer For Start = StartText To EndText Select Case Start Case 1 AutoForms.textbox1.text = "" 'Textbox1 is not recognized by the compiler when textbox1 is in form1. Case 2 AutoForms.textbox2.text = "" 'Textbox2 is not recognized by the compiler when textbox1 is in form1. Case 3 AutoForms.textbox3.text = "" 'Textbox3 is not recognized by the compiler when textbox1 is in form1. Case 4 AutoForms.textbox4.text = "" 'Textbox4 is not recognized by the compiler when textbox1 is in form1. Case 5 AutoForms.textbox5.text = "" 'Textbox5 is not recognized by the compiler when textbox1 is in form1. Case 6 AutoForms.textbox6.text = "" 'Textbox6 is not recognized by the compiler when textbox1 is in form1. End Select Next End Sub
Please help me.




Reply With Quote