Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL: Incorrect Formula Using FormulaR1C1 When Chart Active


View products that this article applies to.

This article was previously published under Q186047

↑ Back to the top


Symptoms

The Microsoft Visual Basic for Applications FormulaR1C1 property does not set a formula reference properly if a chart is active.

NOTE: This is different behavior from earlier versions of Microsoft Excel and Microsoft Visual Basic for Applications.

↑ Back to the top


Cause

This problem occurs when a chart sheet or embedded chart on a worksheet is active, and you run a Visual Basic Sub procedure that uses the FormulaR1C1 property to place a formula in a cell.

↑ Back to the top


Workaround

Activate one of the following sheet types before executing a line of Visual Basic code that includes the FormulaR1C1 property:

  • Worksheet
  • MS Excel 4.0 Macro
  • MS Excel 5.0 Dialog

↑ Back to the top


Status

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

↑ Back to the top


References

For more information about the FormulaR1C1 Property, from the Visual Basic Editor, click the Office Assistant, type FormulaR1C1 Property, click Search, and then click to view "FormulaR1C1 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
For more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:
163435� VBA: Programming Resources for Visual Basic for Applications

↑ Back to the top


Keywords: KB186047, kbpending, kbdtacode, kbbug

↑ Back to the top

Article Info
Article ID : 186047
Revision : 6
Created on : 1/23/2007
Published on : 1/23/2007
Exists online : False
Views : 327