The information in this article applies to:
SYMPTOMS
In Microsoft Excel, you cannot use the Width, Height, Top, or Left
properties of the DrawingObjects object to change the size or position of
an object in a custom dialog box while the dialog box is displayed.
CAUSE
This is by design in Microsoft Excel. You can move and size an object on a
dialog sheet, and the object is displayed with this size and position when
you display the dialog box. However, because a dialog box is not updated
during an event macro (only after the event macro finishes), you cannot
dynamically move or resize an object in the dialog box while the dialog box
is displayed.
WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspTo work around this behavior, you can link a picture of an object on a worksheet to a custom dialog box, and then move the object on the worksheet using a Visual Basic module assigned to a button in the dialog box. Example of Visual Basic ProcedureFor an example of using this method, do the following:
MORE INFORMATIONFor more information about positioning a custom dialog box, query on the following words in the Microsoft Knowledge Base: directly and possible and on-screen and position and dialog Additional query words: 5.00a 5.00c 7.00a XL5 XL7 vba
Keywords : kbcode kbprg PgmOthr PgmHowto |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |