Problem : Disable “A Formula in this Worksheet Contains One or More Invalid References”
I have an Excel 2007 workbook with several worksheets and about 1,000 lines of VBA code. I have one button that calls the code to connect to an SQL Server 2005 database to populate it with data.
After the data population is complete, if I click on “Save” button, the Excel file is saved overtop of itself and everything is fine.
If I click on “Save As” and change the name, I get a couple of “A Formula in this Worksheet Contains One or More Invalid References”. Why does this not happen when I click “Save”?
I can’t find any issues with the references in the workbook. Is there a way to suppress this message?
Solutions : Disable “A Formula in this Worksheet Contains One or More Invalid References”
This is what microsoft states:
When you delete an item from a table that is bound to a chart in
Microsoft Office Excel 2007, you may receive the following error
message:
A formula in this worksheet contains one or more invalid references.
Verify that your formulas contain a valid path, workbook, range name,
and cell reference.
After you correct the references that are not valid in the table, you
may continue to receive this error message.
It seems like this problem is not solved yet by microsoft. Although I found a workaround on the internet, but I did not test this. Im not sure if this will work for you:
1. Backup workbook.
2. Rename the sheet that is causing the problem ‘MySheetOld’
3. Create a new sheet ‘MySheet’ in your workbook.
4. Copy the rows in ‘MySheetOld’ down to but not including the area that
contained your deleted chart.
5. Paste into exactly the same rows in ‘MySheet’.
6. Copy any rows below (but not including) the area in ‘MySheetOld’.
7. Paste into exactly the same rows in ‘MySheet’.
8. Change any names that point to ‘MySheetOld’ to point to ‘MySheet’
9. On all other sheets in the workbook find and replace ‘MySheetOld’ in
formulae with ‘MySheet’.
10. Save workbook.
11. Delete sheet ‘MySheetOld’.
12. Error message should no longer appear.