View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Determine version of Excel in VBA

Sub whatversion()
MsgBox Application.Version
End Sub

if application.version=11 then
do this
else
do that
end if

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"John" wrote in message
...
I'd like to my macro to execute a certain sub if the user is using Excel
2003, and execute another sub if the user is using Excel 2007, both called
from the same shortcut key. Possible?