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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
Back
Top