Re: Entering Formula Programmatically in VBA
- From: "Clif McIrvin" <clare.moe@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Aug 2008 11:56:11 -0500
try > outRange.Formula = tempArray
"MatthewS" <schaefer.mp@xxxxxxxxx> wrote in message
news:5e2fa131-5b67-4ef0-8228-594d2f461415@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm trying to put formulas into cells like this:
formulas(1) = "=Multiply(10,10)"
formulas(2) = "=Multiply(20,10)"
For i = 1 To 2
tempArray(i) = formulas(i)
Next i
outRange.Value = tempArray
This correctly puts the strings into the cells in the range, but they
are not evaluated. I have to select each cell in the *** and go into
the formula bar and hit enter so that they are evaluated. Then they
work fine.
How can I get these cells to evaluate from VBA? I've tried
outRange.Calculate and Application.CalculateFull, but they don't do
the trick.
Do I have the wrong approach to entering a formula in a cell
programmatically? How can this be done?
Thanks
--
Clif
Still learning Access 2003
.
- References:
- Entering Formula Programmatically in VBA
- From: MatthewS
- Entering Formula Programmatically in VBA
- Prev by Date: Looking to proofread an XML document using Interop
- Next by Date: RE: Excel 2000 VBA Calc problem
- Previous by thread: Entering Formula Programmatically in VBA
- Next by thread: Looking to proofread an XML document using Interop
- Index(es):