The information in this article applies to:
SYMPTOMSWhen you run a macro in Microsoft Excel 97, you may receive the following error message: and the macro ends. CAUSE
This problem may occur when all of the following conditions are true:
-and- -and- RESOLUTIONMicrosoft 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.aspThe following subroutine generates a run-time error in Microsoft Excel 97:
To resolve this problem, use either of the following methods.
Method 1Use the Call statement to call the subroutine. For example, the following macro illustrates how to call the subroutine Populate_Dropdown:
Method 2Remove the parentheses that are around the object that is passed to the subroutine. In the following example, the parentheses are removed:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATION
You are not required to use the Call keyword when calling a procedure.
However, if you use the Call keyword to call a procedure that requires
arguments, these arguments must be enclosed in parentheses. If you omit the
Call keyword, omit the parentheses that are around the argument list. To
pass an array to a procedure, use the array name followed by empty
parentheses.
Q41535 Syntax Differs When Calling a SUB without the CALL Keyword Additional query words: XL97 dropdown drop down byref byval parameter
Keywords : kberrmsg kbprg kbdta kbdtacode KbVBA |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |