Excel 2007 - Perplexing Undo VBA runtime error

A

Alipri

I have a worksheet with Worksheet_Change and Worksheet_Calculate macros.
After a cell in the worksheet is changed, the code contained in the events
runs successfully.

However, when the change to the cell is undone using Excel's Undo command, a
1004 Runtime Error is generated when the code in the Calculate event tries to
change the value of a cell in a different sheet.

If a breakpoint is placed at the start of the Worksheet_Change event, and
the cell change is undone, the breakpoint kicks in, and using the Immediate
window to change the Value of any cells generates the same error. (The
interior color of the same cells can be changed however!) This problem does
not happen with the same workbook in Excel 2003.

Any responses gratefully received.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top