View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Living the Dream Living the Dream is offline
external usenet poster
 
Posts: 151
Default How to make macros work in both XL2003 and XL2010?!?

Hi Charlotte

What about testing for the version first before the Ribbon Code is fired.

This is a snippet of code from Ron Debruin's Mail code which tests which
version is running and looks for the applicable security structure
although I think you could use it for your purpose, you will have to
change this to suit..


If Val(Application.Version) < 12 Then 'Version Running is 2000-2003
Call the applicable code.
Else
Select Case Sourcewb.FileFormat
Case 50: Call the applicable code.
Case 51: Call the applicable code.
Case 52: Call the applicable code.
Case Else: Call the applicable code.
End Select
End If

HTH
Mick.