View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
[email protected] sbitaxi@gmail.com is offline
external usenet poster
 
Posts: 158
Default Can I detect if user has Excel 2007 and display different pages?

On Sep 15, 11:47*am, " wrote:
I spent years developing a software applicaitonthat has extra menu
items at the top, and it works, finally, really well...on Excel 2003.
Along comes 2007, and the add-ins now are hidden from the soccer moms
that use the program in an obscure 'add-on' box. Is there any way that
I can detect that someone using my program has Excel 2007 and display
special help messages or something so that I do not have to rewrite
everything? *I have seen ways to change the ribbon back to the 2003
headers, but if the user is familiar with the ribbon concept, that
could even cause more confusion in the future. *Thanks in advance
(again).


Hi RJQMAN:

I got this little bit of code from Ron de Bruin, it tests what version
of Excel is being used, in order to adjust the save method but I am
sure you can adapt this to your needs.

'Determine the Excel version and file extension/format
If Val(Application.VERSION) < 12 Then
'You use Excel 97-2003
FileExtStr = ".xls": FileFormatNum = -4143
Else
'You use Excel 2007
If SrcBk.Parent.FileFormat = 56 Then
FileExtStr = ".xls": FileFormatNum = 56
Else
FileExtStr = ".xlsx": FileFormatNum = 51
End If
End If


Steven