T
tempest0123
I am trying to update cell formulas (R1C1) using the FormulaArray
property and I noticed that if the cell formulas contains more than
one references to external workbooks, I will get this "Unable to set
FormulaArray property of the Range class" error message.
For example:
Suppose I want to update cells A1 and C3 with the following formulas
respectively:
='\\someserver\somewhere\[file_1.xls]Sheet1'!R1C1
='\\someserver\somewhere\[file_1.xls]Sheet1'!R3C3
The following code will work and the formulas will be inserted into
cells A1 and A3.
Dim strFormulas() as String
Redim strFormulas(1 to 3, 1 to 3)
Range(Cells(1,1), Cells(1,3).FormulaArray = strFormulas
However, if I use a formula such as the following that has more than
one external references, I will get an error message.
='\\someserver\somewhere\[file_1.xls]Sheet1'!R1C1+'\\someserver\somewhere\[file_1.xls]Sheet1'!R10C10
It looks to me this is some kind of bug in Excel VBA because the
formulas I'm trying to insert is valid and all external references are
fine.
It would be greatly appreciated if anyone can provide a solution to
this issue.
Thanks.
property and I noticed that if the cell formulas contains more than
one references to external workbooks, I will get this "Unable to set
FormulaArray property of the Range class" error message.
For example:
Suppose I want to update cells A1 and C3 with the following formulas
respectively:
='\\someserver\somewhere\[file_1.xls]Sheet1'!R1C1
='\\someserver\somewhere\[file_1.xls]Sheet1'!R3C3
The following code will work and the formulas will be inserted into
cells A1 and A3.
Dim strFormulas() as String
Redim strFormulas(1 to 3, 1 to 3)
Range(Cells(1,1), Cells(1,3).FormulaArray = strFormulas
However, if I use a formula such as the following that has more than
one external references, I will get an error message.
='\\someserver\somewhere\[file_1.xls]Sheet1'!R1C1+'\\someserver\somewhere\[file_1.xls]Sheet1'!R10C10
It looks to me this is some kind of bug in Excel VBA because the
formulas I'm trying to insert is valid and all external references are
fine.
It would be greatly appreciated if anyone can provide a solution to
this issue.
Thanks.