User entered data in text box to be used in other parts of the program

Robster
02-17-2008, 02:49 PM
I know my title is a bit vague so I will try my best to describe in detail what I need.

I have a text box that the user types there name into. What I need is to store what the user has entered in this text box and print this name in another form in my program.

Hope that makes sense and I also realise this is a really simple question but i know how helpful you guys are on here so any help will be much appreciated.

Thanks in advance!

Gruff
02-17-2008, 03:21 PM
Pretty fundemental Rob,

You can use form1.text1.text to specifiy the value of the textbox from another form. if form1 is not available then you can store the textbox variable value in a global variable. You define global variabes in .bas modules.

Public myGlobalvar as string

For a better understanding of the topic look up 'Variable Scope' in VB help.

~T

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum