Hi There,
My friend asked me today if i knew anything about visual basic..Which i dont
Anyway he is trying to make a message box like so..
If countC(0) > (voterscount * 0.5) Then
MsgBox("Absolute Majority to Candidate 1 with", percent1)
Exit Sub
End If
He wants it so a message box says
"Candidate 1 wins with 54% of the votes"
Where of course the 54% is changeable
Does anyone have an idea of how to do this?
Thanks
Message Box In Visual Basic
Started by
Diaz
, Apr 30 2007 12:48 PM
3 replies to this topic
#1
Posted 30 April 2007 - 12:48 PM
#2
Posted 30 April 2007 - 01:14 PM
Tell your friend, he should use the notice command,
//make var var$ = "..." notice "Absolute..." + var$
#3
Posted 30 April 2007 - 03:31 PM
Is your friend doing A-Level computing coursework?
#4
Posted 19 July 2007 - 12:50 AM
msgbox("Candidate 1 wins with " & PercentVar & " of the votes")
this is how you combine parts of a string, use & as 'and'
example
dim MyName as string
MyName = "Nick"
msgbox("Hello " & MyName)
would show
Hello Nick
this is how you combine parts of a string, use & as 'and'
example
dim MyName as string
MyName = "Nick"
msgbox("Hello " & MyName)
would show
Hello Nick
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users