Link to home
Start Free TrialLog in
Avatar of Norma Posy
Norma PosyFlag for United States of America

asked on

MsgBox

The second parameter in a call to MsgBox (following the message text) often has more than one item. I have seen them concatenated three different ways. For example:

vbQuestion Or vbYesNo
vbQuestion + vbYesNo
vbQuestion & vbYesNo

Question: (VB6) Which is the recommended way to do it?
I have four VB books, and none of them seem to address this.
SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Norma Posy

ASKER

Thank you both.

vb constants are really integers. I am guessing that the assignments are such as to allow unambiguous mingling. For instance, if one set goes from (binary) 0 to 111, and another goes from 1000 to 1111, and a third goes from 10000 etc. -- then a logical OR or an arithmetic + can (bitwise)  separate them out. "&" may  be the logical AND, or it may be a signal that the concatinated items are of different data types.

I'm just guessing.

- - Norma
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2015