On Wed, 8 Sep 2004 15:03:08 -0700, Marknanh wrote:
Simple question. I'm a VBA programmer who has just switched to VB .net. I'm
using a UserForm called Form1 with a text box called TextBox1.
I'd like to reference the number in the text box in the module called Engine
by using the following statement
Dim num as Double
num = Form1.TextBox1. Value
However, I can not see the TextBox1 after I finish typing "Form1". What's
going on?
In addition to Cor's comment, is "Form1" the name of the instance of your
form? Or is it the name of the form class?
In other words, did you do something like this anywhere:
Dim Form1 As New UserForm
num = Form1.TextBox1. Text
If Form1 is the name of your form *class* then you must get the value of
the textbox using an *instance* of the class and not the class name.
HTH a little
--
Chris
dunawayc[AT]sbcglobal_lunch meat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.