Msgbox Close Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to disable the red X on a Msgbox, or would you have to create
a custom userform to do this?
 
The X in the top right corner of a message box is not colored red
and there would be no normal reason to remove it.

The "Critical" notice on a message box ( a red X) is created by the
inclusion of the constant "vbCritical" as one of the msgbox arguments.
You can simply remove it or replace it with vbInformation or vbExclamation.
As an example, try both code lines below:

x = MsgBox("This is a test", vbOKCancel + vbCritical, " Test of X")
'---
x = MsgBox("This is a test", vbOKCancel , " Test of X")

'--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"jnf40" <[email protected]>
wrote in message
Is there a way to disable the red X on a Msgbox, or would you have to create
a custom userform to do this?
 

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

Back
Top