XL: GoalSeek Method in VB Macro Returns the Wrong AnswerLast reviewed: February 2, 1998Article ID: Q124096 |
The information in this article applies to:
SYMPTOMSThe GoalSeek method in Visual Basic for Applications may return an answer that is different from the one returned by the Goal Seek command on the Tools menu. The correct answer is the one returned when you choose Goal Seek from the Tools menu.
WORKAROUNDIf the GoalSeek method does not return the correct answer, use the Application.ExecuteExcel4Macro command to run the Microsoft Excel 4.0 GOAL.SEEK macro command. 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 engineers 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/supportnet/refguide/The following example sets cell A1 to the value 15 by changing cell B1.
Example
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
REFERENCES"User's Guide," version 5.0, Chapter 6, "Seeking a Value That Solves a Formula" For more information about the GoalSeek Method, choose the Search button in Visual Basic Reference Help, and type the following:
GoalSeek |
Additional query words: 5.00 5.00c 7.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |