Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Formulas still breaking

Re-starting an older thread...

I have a workbook "template" that consists of a Summary worksheet and
a LOT of VBA code. Depending on inputs from another program (stored in
a db), the VBA code will open the template and generate one or more
new worksheets in the book. They have names like "Alt" and "NP".

The Summary sheet refers to cells in the sheets that may or may not be
created. For instance, one of the cells on the Summary sheet says:

=Alt!$P$4+Alt!$Q$1

If the Alt sheet was created by the VBA code, then this cell will show
the sum of those two cells. If not, it shows #REF, no big deal. There
are about four dozen of these formulas on the Summary sheet.

Periodically Excel will modify the formula without user input. It will
replace the sheet name with a new reference to the sheet's name as if
it were a workbook name, like this...

=[Alt]Alt!$P$4+[Alt]Alt!$Q$1

Whenever this happens, any recalc on the summary page will cause the
"Update Values" open file dialog box to appear. If you Cancel, which
is all you can do, then it leaves the [Alt] in there. If you try to
remove the [Alt] by any means, Search and Replace or hand-editing, the
dialog box appears again, and Canceling once again re-inserts the
bogus book reference.

Can anyone suggest why this is happening?

And how to fix it? Someone suggested using =INDIRECT, but that did not
have any effect.

Maury
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Breaking up Column da Excel Discussion (Misc queries) 6 March 17th 09 10:24 PM
Breaking the scale Doubs Excel Discussion (Misc queries) 1 September 15th 05 03:59 AM
Breaking Links Guilherme Loretti Excel Discussion (Misc queries) 1 March 9th 05 09:56 PM
Breaking Out of an If Statement scain2004[_11_] Excel Programming 4 May 19th 04 02:28 AM
breaking out of a loop ChuckM[_2_] Excel Programming 1 December 16th 03 07:07 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"