Hi I have a workbook that I have designed in Excel 2000 which I am now trying to get working in 2007. I am slowly working through the things that are not working and changing the code accordingly.
One issue I had was that I needed to include the following line of code to make the workbook function correctly in 2007:
This works fine in 2007, but obviously Excel 2000 does not understand this as I think this is a new syntax in 2007.
I have a system in place which checks the version of Excel running and only attempts to run this line of code if it is running on 2007, but the macro still stops at this line in 2000.
I have tried a few other things with the final code being:
As I said previously, this should not even get to run on Excel 2000, but still brings up the error "Compile error: Method or data member not found".
Is there anyway around this issue as I guess it may come up again with new syntaxes that earlier versions of Excel do not understand?
Thanks for any help in advance.
One issue I had was that I needed to include the following line of code to make the workbook function correctly in 2007:
Code:
ThisWorkbook.CheckCompatibility = False
This works fine in 2007, but obviously Excel 2000 does not understand this as I think this is a new syntax in 2007.
I have a system in place which checks the version of Excel running and only attempts to run this line of code if it is running on 2007, but the macro still stops at this line in 2000.
I have tried a few other things with the final code being:
Code:
Sub Runif2007()
If Sheets("Report Creation").Range("C7") = "Excel 2007" Then
On Error Resume Next
Application.DisplayAlerts = False
ThisWorkbook.checkcompatibility = False
Application.DisplayAlerts = True
End If
End Sub
As I said previously, this should not even get to run on Excel 2000, but still brings up the error "Compile error: Method or data member not found".
Is there anyway around this issue as I guess it may come up again with new syntaxes that earlier versions of Excel do not understand?
Thanks for any help in advance.