Click here to Skip to main content
13,595,207 members
Rate this:
Please Sign up or sign in to vote.
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 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 31-Dec-12 1:08am
Updated 31-Dec-12 9:18am
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..
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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

Don't use ,& but &

Hope this helps.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.180621.3 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100