View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default Compiling Error in Earlier Version of Excel

"Tim Childs" wrote:
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


#If VBA7 Then
ThisWorkbook.ForceFullCalculation = True
#End If

VBA7 is false (undefined) in Excel 2003 and true in Excel 2010. I don't
know about Excel 2007.