Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
Is there anything else exept MsgBox, in the end to show the data, like a list of subject or a list of student names....to display data after button click?
and which one is right?
a) MsgBox("Your name is" ,&txtyourname.Text)
b) MsgBox "Your name is, txtyourname.Text"
c) Else...?
Posted
Updated 31-Dec-12 9:18am
v3
Comments
Christian Graus 31-Dec-12 15:17pm    
For you to even need to ask this, means you didn't both even trying anything and have no idea about VB syntax or programming. Buy a book and read it. Do not learn VB6, it is obsolete. Also, try to give your question a real subject. Your tag says you're using VB, and we know you need help
San Dra 31-Dec-12 16:37pm    
Really that's Not msgbox syntax ...Hmmm..anyway thnxx for clear it up..

Remove the comma and it should work fine. You need to concatenate the two strings together. You can do that with either + and &, where & is most efficient.

MsgBox("Your name is" & txtyourname.Text)

Good luck!
 
Share this answer
 
Else:
VB
MsgBox("Your name is " & txtyourname.Text)

Don't use ,& but &

Hope this helps.
 
Share this answer
 
Comments
M.Edmison 31-Dec-12 12:33pm    
Did this question get answered, looks like there was question behind different ways to show a display box?

You can do a timed form which is much like a splash screen, you could also do a messagebox with a sleep which most people don't like to use because of the frozen thread.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900