vbavb6vbscriptmessagebox

Is there any way to align text in message box in vb or vba?


Is there any way to align text into the center in msgbox in VB or VBA? Does VB have any functionality to do the same?


Solution

  • No. The MsgBox() function is simply a wrapper for the Windows MessageBox() function and as such has no stylistic control over the dialog beyond the icon.

    If you want to change it any further than this, you will need to create your own window and show that instead.

    On Windows Vista+ you can use TaskDialogs that allow a lot more control.