View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Mark is offline
external usenet poster
 
Posts: 989
Default Evaluating formulas when a template is brought into a worksheet...

ahh, I see I didn't even need the integer i .

I started to do something slightyly different, and then missed taking that
back out.

"mark" wrote:

Hi.

I have a template that has a bunch of formulas in it. It is stored as a
template, and then programatically brought into a workbook.

Some of the formulas in the template are intended to perform lookups against
named ranges in the worksheet that it is brought into. However, the formulas
do not evaluate when the template is brought in.

At first, I thought that just forcing a recalc would take care of it, but it
does not.

If I put this sbEval in, the formulas evaluate, and everything's fine:

***********
Sub sbEval()
Dim c As Range
Dim i As Integer
i = 1
For Each c In Range("rgRateLookup").Cells
c.Formula = c.Formula
Next c
End sub
*************

Is there a different better way to do that? It's not a lot of cells, this
will work. It's just that I thought recalc would handle it, and it didn't.

Thanks.