VB MsgBox Icons similar to Data / Validation / Error Alert's

G

Guest

Hi

Just an idle query really...

If i create a bespoke message in Excel through Data/Validation/Error Alert,
i get the option to include a graphic for either; 'Stop', 'Warning' or
'Information'. I dont suppose there is some way of entering these, or perhaps
other graphics / icons, into my bespoke messages in VB code using "MsgBox
(Prompt, Buttons, Title, Help File, Contexts)"?

As always, any help gratefully receieved, let me know if you need any more
info


cheers


jb
 
J

Jim Rech

I think with the Msgbox function you're limited to the icons these 4 values
for the "Buttons" argument creates:

vbCritical 16 Display Critical Message icon.
vbQuestion 32 Display Warning Query icon.
vbExclamation 48 Display Warning Message icon.
vbInformation 64 Display Information Message icon.


--
Jim
| Hi
|
| Just an idle query really...
|
| If i create a bespoke message in Excel through Data/Validation/Error
Alert,
| i get the option to include a graphic for either; 'Stop', 'Warning' or
| 'Information'. I dont suppose there is some way of entering these, or
perhaps
| other graphics / icons, into my bespoke messages in VB code using "MsgBox
| (Prompt, Buttons, Title, Help File, Contexts)"?
|
| As always, any help gratefully receieved, let me know if you need any more
| info
|
|
| cheers
|
|
| jb
 
G

Guest

Hi Jim,

that's great, many thanks.

The MsgBox these create seem only to be of the 'vbOKonly' type. I can
understand this for 'Information', 'Critical' & maybe even 'Exclamation', but
I dont understand the point of asking a 'Question' however with only one
possible response!

Do you know how to amend the MsgBox so it includes the 'vbQuestion' aspect
aswell as say the 'vbYesNoCancel' bit?

Many thanks again

jb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top