View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default Unexpected file change

In message of Sat, 28 Jul 2012 09:35:05 in
microsoft.public.excel.programming, joeu2004 writes
"Walter Briscoe" wrote:
I have a .xls file, opened by Excel 2003.
When I open it, either by clicking it, or from a shortcut,
or by opening it from Excel, or even in safe mode, it is
changed and I get "Do you want to save the changes you made
to 'X.xls'?" I can open other files without changing them.


This can happen when opening files in Automatic calculation mode that
contain formulas that reference "volatile" functions.

Some obvious "volatile" functions that do change with each
recalculation are RAND, RANDBETWEEN, TODAY and NOW. Presumably you
don't use them, because I infer that you do not expect the file to
actually change.

Some less-obvious "volatile" functions are OFFSET and INDIRECT.


[snip]

Thanks for a helpful reply.
I thought about volatile functions after posting.
I had considered NOW, but would not have thought of INDIRECT.
I trimmed my workbook to a single example "constant" formula
=INDIRECT("Sheet1!J"&201)

In the real file that is =INDIRECT("Sheet1!J"&$A2) where A2 is
=MATCH($B$2,Sheet1!$A:$A,0)

I can write some code to evaluate the formulae when required.
Any other ideas?
--
Walter Briscoe