No you can't change the color of the text if you are using the MsgBox function.
The alternative is to roll your own message box form using a VB6 COM object. This would have a selection of buttons and Icons to choose from and one or more labels with appropriate properties. There are a number of such COM objects around, usually with source. For example I use a simple form object that I wrote which has a variable number of entry fields each with its own label etc.
For scripts that are interactive via the Windows GUI this is one reason why I tend to write them as HTAs, hosted in IE instead of in WSH. There you have all of DHTML to work with, along with CSS for fine control over the appearance of dialogs of various sorts.
They can't always do everything that a WSH script can do, but they handle a very large percentage of scripts. Some information can be found at:
Another possibility is to use IE as an automation object from a WSH script as a flexible dialog tool for WSH scripts. Some people really like that option though I personally find it clunky and avoid it - but it's another tool in the scripter's toolkit. See:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.