Help - Search - Members - Calendar
Full Version: Message Box In Visual Basic
Pixel2Life Forum > Help Section > Desktop Programming
Diaz
Hi There,

My friend asked me today if i knew anything about visual basic..Which i dont sad.gif

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 biggrin.gif
Frozen_W
Tell your friend, he should use the notice command,

CODE
//make var
var$ = "..."
notice "Absolute..." + var$
Surge
Is your friend doing A-Level computing coursework?
cammarata123
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 a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.