Sunday, May 13, 2007

Message Box


When you need to communicate with users, you can use message boxes. This macro will display a message "This macro is created by Julian". The Message Box appearance can be customised to show whether it is Information, Critical Messages. Here the icon in the message box would be different. The buttons can also be customise to show extra Yes, No, Ok buttons. (Refer to vbYesNo macro). This macro will show you 3 different styles.

Sub MyMessage()
MsgBox "This macro is created by Julian"
MsgBox "The icon is different", vbInformation
MsgBox "The top title is different", vbExclamation, "Julian's Tips"
End Sub

1 comment: