Click here to Skip to main content
11,805,577 members (61,125 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB
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
San Dra391
Edited 31-Dec-12 9:18am
Christian Graus at 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 at 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.
wolfcoder75 at 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
0 OriginalGriff 3,265
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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