View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MerseyBeat MerseyBeat is offline
external usenet poster
 
Posts: 16
Default Compiling Error in Earlier Version of Excel

"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