
| Call Msgbox(Prompt, Style, Title) |
the Style and the Title, and also use a variable to hold the value, if you use a yes and no button. |

Visual Basic provides us with many different styles for
our
message boxes, here are some:
| msgbox vb style | description | special picture |
| vbCrtical | OK button and a critical error picture. | |
| vbExclamation | OK button and an exclamation point picture. | |
| vbInformation | OK button and an info picture. | |
| vbOkCancel | Ok button and a Cancel button. | none |
| VbOkOnly | Ok button, that's it. | none |
| vbQuestion | Ok button, with a question picture. | |
| vbSystemModal | Ok button, with a neat icon on the title bar of the msgbox, of a system logo - take a look | ![]() |
| vbYesNo | YES and NO button, that's it. | none |

|
Call Msgbox("Hey Guys - wassup?",vbExclamation,"nauts-crib.com") |
Prompt
Style
Title
When It is Executed:
|
|
VbNewLine
Yes, that's the
function, you would use it like this..:
|
Call Msgbox("Hey" & vbNewLine & "Guys" & vbNewLine & "Wassup?",vbExclamation,"nauts-crib.com") |
When Executed:
|
|

(what button they
picked)
|
TheBox =
Msgbox("This is a yes or no
vb message box",vbYesNo,"nauts-crib.com") |
The Break Down
| 1.
We set our message box to the
variable TheBox (TheBox now holds the value of the button they
clicked) 2. We set up a conditional statement, asking vb if the value of TheBox was vbYes, and if it is to send another message box up telling the user they picked yes. 3. We set up another conditional statement, asking vb if the value of TheBox was vbNo, and if it is to send another message box up telling the user they picked no. |
1999-2000 © Erik Helgesen
All Rights Reserved.
Only permitted Images and
Material may be downloaded from this web site.
PhotoShop, Flash, and
Microsoft Visual Basic are registered trademarks!