Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MsgBox Problem 3

Status
Not open for further replies.

norason

Programmer
Jan 28, 2009
139
US
When I invoke this MsgBox it ignores the YesNo and only shows OK.

I've tried placing the VbExclamation, "PRINT?" in various places in the MsgBox line, but nothing I've tried works.

Why?

Dim Rtn
If LstPrinters.ListIndex >= 0 Then
Rtn = MsgBox("Do you wish to print the graph on " & StrConv(LstPrinters.Text, vbUpperCase) & " Printer", vbInformation + vbYesNo + vbExclamation, "PRINT?")


Thanks,

Gary

 
Your problem is here:

vbInformation + vbYesNo + vbExclamation

You cannot use the information icon AND the exclamation icon. Pick one, remove the other, and you'll be fine.

I would actually suggest that you remove the Information and the Exclamation and replace it with the Question.

Code:
Dim Rtn
If LstPrinters.ListIndex >= 0 Then    
     Rtn = MsgBox("Do you wish to print the graph on " & StrConv(LstPrinters.Text, vbUpperCase) & " Printer", [!]vbQuestion + vbYesNo[/!], "PRINT?")

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
You can't have
Code:
vbInformation + vbYesNo + vbExclamation
as it's more than one icon you're trying to assign. You can either have
Code:
vbInformation + vbYesNo
or
Code:
vbInformation + vbYesNo
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.

 
Thanks a million! That solved the problem.

On another note - how do I mark this thread as closed?

Thanks,

Gary
 
You're welcome.

how do I mark this thread as closed?

This forum (tek-tips) does not have that functionality.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
You could click the "Thank MEMBERNAME for this valuable post!" link thus alerting future searchers that you found the members post useful.

[smarty]
 
You can go to and get very nice add-in to your VB 6 environment. Among A LOT of other tools you will find a Message Box Assistant where you can use nice GUI to create pretty much any message box you desire, and it will create a code for you, too.

And the price is right for this – it is FREE. :)

Have fun.

---- Andy
 
Totally agree with Andy, MzTools is an excellent programming add-in.

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top