Microsoft KB Archive/180448

= XL98: OK Button in Message Box Is Right-Aligned or Centered =

Article ID: 180448

Article Last Modified on 9/11/2002

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q180448



SYMPTOMS
In Microsoft Excel 98 Macintosh Edition, if you run a Microsoft Visual Basic for Applications macro (Sub procedure) that displays a message box, the OK button in the message box may appear either right-aligned or center- aligned.

For example, the message box may appear like this   This is a somewhat long text string to show in a message box.

[    OK     ] or like this:   Short message.

[    OK     ]



STATUS
This behavior is by design of Microsoft Excel 98 Macintosh Edition.



MORE INFORMATION
Different versions of Microsoft Excel use different methods to determine the size of message boxes and the location of the OK button in a message box:    Version of            Size of                  Location Microsoft Excel      Message Box              of OK Button

Microsoft Excel 98   Changes to accommodate   Fixed distance from Macintosh Edition    text                     right side of message box

Microsoft Excel 5.0  Fixed width; message     Fixed distance from for the Macintosh    box is always the same   right side of message size                    box

Microsoft Excel for  Changes to accommodate   Centered Windows              text

Because of the behavior of message boxes in Microsoft Excel 98 Macintosh Edition, the OK button may appear to be either right-aligned or centered within the message box, depending on the length of the message. In both cases, however, the button is actually right-aligned.

Note that this behavior does not apply to UserForms; if you create a UserForm that contains a label and a command button, the UserForm will appear correctly when you display it.

Additional query words: XL98 right flush

Keywords: kbbug kbprogramming kbprb kbusage KB180448

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.