View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default MsgBox in Userfrom?

The built in Message Box is part of the Windows Application that can be
called from any of the other Microsoft applications. So if you make any
changes to its properties, it will apply to all applications and in every
appearance of the message box when called. What most people do is design a
UserForm with a Label to contain the text. That way the text properties can
be customized to the users needs or whims.

Open the VB editor
Insert UserForm
From the Tool Box select Label and deposit it on the Userform
Manually size the UserForm with the mouse to the size desired for the
message box
Mannually size the Label to cover the UserForm except for the Title bar.
With focus on the UserForm, in the properties box at lower left of the
screen, enter the caption desired for the message box
With focus on the Label, in the properties box at lower left of the screen,
enter the caption for the message you want to display in the message box.
It would probably be prudent to give a name to the UserForm for easy
identification from other forms.
To display the created form in code you would use the Show method.

Example:

Sub msBx()
UserForm1.Show 'Substitute name for form.
End Sub

The form will act like the regular message box by suspending code execution
until the user clicks the big X in the upper right corner of the form.





"TotallyConfused" wrote in
message ...
I would like to know if you can make a MsgBox flash a couple of time (to
grab
user's attention and make the font in the msgbox stand out? If so how, or
where can I see a sample. thank you in advance for any help you can
provide.