I have a workbook with 5 worksheets and here is what I am trying to do:
I allow users to pass in a datetime parameter that I then populate the value in the Parameters Worksheet Cell A1. I use Parameters.Range("A1") to calculate dates on another worksheet. I have another worksheet called RawData1 that is populated from a DataSet that is returned via a Store Procedure call using the values from the Config worksheet. There is another worksheet called Validation that performs the following calculation in cell A1 after the dataset is inserted into RawData1. My problem here is that the formula in Validation.Range("A3") never recognizes the values of the cells that have been populated on the RawData1 worksheet, even after I call CalculateAllValue() on the workbook. Is there some sort of refresh method I need to call to update the references before the formulas run? I tired to save the workbook and load it again thinking the calculations would update but they did not. If I physically open the workbook in excel the formulas will execute and the values will update correctly.
Validation Formula looks like this
?validationSheet.Range("A3").Formula
"=ABS('RawData1'!A12-'Parameters'!A1)"
The RawData1'!A12 value is always coming back as 0 even though I can see the value of it when I do this in my immediate window
?tempSourceWorkbook.Worksheets("RawData1").Range("A12").DisplayedText
"2/28/2014"
?tempSourceWorkbook.Worksheets("RawData1").Range("A12").NumberValue
41698.25