XL97: Run-Time Error Using FormulaArray Property (192989)



The information in this article applies to:

  • Microsoft Excel 97 for Windows

This article was previously published under Q192989

SYMPTOMS

When you try to create an array formula by using a Visual Basic for Applications macro, you may receive the following error message:
Run-time error '1004': Unable to set the FormulaArray property of the Range class

CAUSE

This problem occurs when you try to pass a formula that contains more than 255 characters, and you are using the FormulaArray property in Visual Basic for Applications.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

An array formula can perform multiple calculations and then returns either a single result or multiple results. You create array formulas the same way that you create basic, single-value formulas. However, with an array formula, after you create the formula, instead of entering the formula by pressing the ENTER key, you enter the formula by pressing the CTRL+SHIFT+ENTER keys.

An array formula can be identified by the braces ({}) surrounding the formula. To create an array formula in Visual Basic for Applications, you can use the FormulaArray property. However, you cannot create a formula that has more than 255 characters by using this property. Note that the Formula property in Visual Basic for Applications does not have this limit.

For additional information, please see the following articles in the Microsoft Knowledge Base:

105416 XL: Passed Strings Longer Than 255 Characters Are Truncated

166492 XL97: "Unable to Record" Message When Recording a Macro

REFERENCES

For more information about the FormulaArray property, from the Visual Basic Editor, click the Office Assistant, type "FormulaArray," click Search, and then click to view "FormulaArray Property."

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:

176476 OFF: Office Assistant Not Answering Visual Basic Questions


Modification Type:MinorLast Reviewed:10/10/2006
Keywords:kbbug kberrmsg kbpending KB192989