sjn78 Posted May 9, 2003 Posted May 9, 2003 I have just begun using classes (god bless them) and still learning how to do functions with them. Is there a way to set up a class to read the text in a text box. EG. Have a textbox and its text is 'Testing" Now, can i call a a class, say getvalue(), and have the string 'Testing' associated with it so I can use it in another sub. eg, msgbox ("The Text Box is " & getvalue()) Is this possible Thanks Steve Quote
vincentnl Posted May 9, 2003 Posted May 9, 2003 I would not recommend creating another class for reading the text of a textbox. That can best be done in the class (most likely a form or derivative) that the textbox is in. reading your text, i get the feeling you are mixing up methods and classes. I think this is what you need private function Testing() as String return Textbox.text End function nothing class related. If you want to use this in other classes, make it public in stead of private. Quote
sjn78 Posted May 9, 2003 Author Posted May 9, 2003 Thanks for that. That is the way I would of use to of done it, but since learning about classes, I havent got my head around where and when they should be used. Still learning everyday though. Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.