MsgBox Assistant

Top  Previous  Next

The MsgBox Assistant feature allows you to generate message boxes easily.

MZ-Tools offers the following ways to launch the MsgBox Assistant:

  • The Tools | MZ-Tools | Other Utilities | MsgBox Assistant menu.
  • The MZ-Tools | MsgBox Assistant context menu of a code window.
  • The Other Utilities | MsgBox Assistant menu on the MZ-Tools toolbar.
  • The shortcut customized in the Options window, Shortcuts tab.

The MsgBox Assistant window is the following:

msgbox_assistant

In this window you can enter the following:

  • Title: the title of the message box. It can be App.Title or a custom one.
  • Icon: the icon of the message box or none.
  • Text: the prompt of the message box.
  • Buttons and default button: the combination of buttons of the message box and the button which will be preselected when showing the message box.
  • vbSystemModal: check this setting if the message box should be accepted before continuing using any application and not only the current application.
  • vbMsgBoxRight: check this setting if you want to display text with alignment to the right.
  • vbMsgBoxRtlReading: check this setting if you want to display text in a right-to-left reading order (Hebrew and Arabic systems).
  • Help ID.:the help identifier (optional). If you enter a value, App.HelpFile will be used.

Once you have entered all the values, you can:

  • Preview the message box.
  • Insert the message box code into the current procedure.
  • Copy the message box code to the clipboard for later use.

If the message box includes only the OK button, then the generated code will be like this:

 

Call MsgBox("The file can not be copied.", vbExclamation, App.Title)

Otherwise it will be like this:

 

Select Case MsgBox("The file can not be copied.", vbAbortRetryIgnore + vbExclamation + vbDefaultButton1, App.Title)

 

Case vbAbort

 

Case vbRetry

 

Case vbIgnore

 

End Select

See Also:

Shortcuts Customization