Ref. problem after sheet import
Hmmm, updates can be a bit tricky...
Search for "recalculate" in the Excel help. There's quite a bit of info in
there, but in short, this is what Excel says:
=========================
Press F9
Calculates formulas that have changed since the last calculation, and
formulas dependent on them, in all open workbooks. If a workbook is set for
automatic calculation, you do not need to press F9 for calculation.
Press SHIFT+F9
Calculates formulas that have changed since the last calculation, and
formulas dependent on them, in the active worksheet.
Press CTRL+ALT+F9
Calculates all formulas in all open workbooks, regardless of whether they
have changed since last time or not.
Press CTRL+SHIFT+ALT+F9
Rechecks dependent formulas, and then calculates all formulas in all open
workbooks, regardless of whether they have changed since last time or not.
=========================
So, try sending these keystrokes (using SendKeys) or use their VBA
equivalents (Calculate/CalculateFull). Also, make sure you take a closer look
on your preference settings, which can change the way how recalculations are
performed.
And although this is perhaps not applicable to you at this moment, please
keep in mind that there are separate ways to update links to external data
(see for example the UpdateLink method in VBA, and your application
preferences).
Cheers,
/MP
"Christian" wrote:
The problem I am having is that after I import a Template sheet with
references
to the Master sheet the cell references are not updated.
I do this so when the master sheet is updated the same cell in the
other sheets
change to the same value.
For example:
The cell on the Imported sheet say A1 would have a reference
=Summary!$I$6
Summary is a Sheet in the workbook the sheets are imported to.
I have tried the SendKeys "{F2}~" after the code that imports the
sheet but that does not work. The only thing that works is if I select
the cell with the #Ref problem click in the formula bar and press
enter. like SendKey "{F2~}".
I don't want to go through all the cells like that as there could be
100 of them.
Is there another way to update the linked values?
Any help would be apreciated.
|