get textbox text

berrick

New member
Joined
Oct 23, 2006
Messages
2
Programming Experience
Beginner
Hi every1,

i'm trying to learn VB on and off the hard way.... just jumping in and doing it, or not as most often the case ;)

The question i have is to do with textbox on a PPC (or vb in general), I have a form with a textbox and some default text entered. When a user enters text it is displayed in the textbox but how do i replace this default text with that, the user types in the textbox so i can display it with something like below

messagebox.show(me.mytextbox.text)

currently it returns the default text not the text the user has just entered.

Hmmmm hope i havent confussed you.

Any help appreciated
 

Nisroc

New member
Joined
Oct 27, 2006
Messages
1
Programming Experience
Beginner
im a noob to this too so do not take my word.

MessageBox.Show("text")

Any text must go between the quotes. If you calling a variable you do not have to quote it.

dim text as string
MessageBox.Show(text)

EDIT: one last thing you can also do them both. Do NOT take my word for this but it think it is done like.

dim text as string
MessageBox.Show(text, "text")

hope this helps
 
Last edited:

berrick

New member
Joined
Oct 23, 2006
Messages
2
Programming Experience
Beginner
thanks for the reply,

my problem was i was trying to load txt in one form and read it from another. I sorted it now.

the problem was i think due having another instance of the 1st form running.
 
Top Bottom