ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB MsgBox Icons similar to Data / Validation / Error Alert's (https://www.excelbanter.com/excel-programming/388677-vbulletin-msgbox-icons-similar-data-validation-error-alerts.html)

JB2010

VB MsgBox Icons similar to Data / Validation / Error Alert's
 
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

Jim Rech

VB MsgBox Icons similar to Data / Validation / Error Alert's
 
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
"JB2010" wrote in message
...
| 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



JB2010

VB MsgBox Icons similar to Data / Validation / Error Alert's
 
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

"Jim Rech" wrote:

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
"JB2010" wrote in message
...
| 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




RB Smissaert

VB MsgBox Icons similar to Data / Validation / Error Alert's
 
Maybe you need a messagebox with much more options:
http://devnull.at/?IPB7C

RBS

"JB2010" wrote in message
...
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




All times are GMT +1. The time now is 12:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com