OFF98: Program Quits Unexpectedly Using Unload with Enter Event

ID: Q190190

The information in this article applies to:

SYMPTOMS

When you display a user form in a Microsoft Office 98 Macintosh Edition program, the program may quit unexpectedly.

CAUSE

This problem may occur when all of the following conditions are true:

WORKAROUND

If you must use the Unload statement in the code that is attached to the Enter event for a control, set the TabIndex property to a value other than zero.

To change the TabIndex property for a control, follow these steps:

1. Select the control on the user form.

2. If the Properties window is not visible, click Properties Window on

   the View menu.

3. In the Properties window, scroll until you see the TabIndex property and
   type a number other than zero for the property.

NOTE: This method renumbers the TabIndex property for all the controls on the user form. Check this property for all the other controls to see if they are in the correct order.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Microsoft 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/refguide/

Because the Enter event occurs before the focus is moved to another control, you can use the Enter event to display instructions. For example, you can use a macro or event procedure to display a small form or message box that identifies the type of data the control contains.

REFERENCES

For more information about the Enter event, from the Visual Basic Editor, click the Office Assistant, type "enter event," click Search, and then click to view "Enter, Exit Events."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If the Assistant is not able to answer your query, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q176476
   TITLE     : OFF: Office Assistant Not Answering Visual Basic Questions

Additional query words: XL98 OFF98
Keywords          : kbprg kbdta xlvbahowto xlvbainfo 
Version           : MACINTOSH:98
Platform          : MACINTOSH
Issue type        : kbbug
Solution Type     : kbnofix

Last Reviewed: April 7, 1999