View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tim Childs[_4_] Tim Childs[_4_] is offline
external usenet poster
 
Posts: 31
Default Compiling Error in Earlier Version of Excel

Hi MB

Thanks or response. In fact, I have tried this already but the compiler
"tests" all the code before runtime so this has not got round the compiling
problem

Best wishes

Tim

"MerseyBeat" wrote in message
...
"Tim Childs" wrote in message
...
Hi

This piece of code
ThisWorkbook.ForceFullCalculation = True
will work in Excel 2007 and above

Is there any way to mark the code so that it will avoid the COMPILING
error in earlier versions where this functionality was not available? (I
use the file in different versions of Excel)

Many thanks

Tim


Tim,

I believe Excel 2007 is version 12.0. If I am wrong I presume others will
weigh in and correct me.

Try the following:

If Application.version = 12 then
ThisWorkbook.ForceFullCalculation = True
End if

MB