ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2007 vba Is there a way (subroutine or API calls) to get the version of Excel that is running? (https://www.excelbanter.com/excel-programming/433302-excel-2007-vba-there-way-subroutine-api-calls-get-version-excel-running.html)

rick

Excel 2007 vba Is there a way (subroutine or API calls) to get the version of Excel that is running?
 
I have done some work with the ribbon as well as some 2007-only vba
constructs and need to determine the level of Excel that opened the workbook
so I may set the menu bar and command bars properly.

Something like the OBtn/resources/about.

Thanks.

...rick


Ron de Bruin

Excel 2007 vba Is there a way (subroutine or API calls) to get the version of Excel that is running?
 
Use

If Val(Application.Version) < 12 Then
'97-2003
Else
'2007
End If

See also
http://www.rondebruin.nl/compatiblemenu.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"rick" wrote in message ...
I have done some work with the ribbon as well as some 2007-only vba
constructs and need to determine the level of Excel that opened the workbook
so I may set the menu bar and command bars properly.

Something like the OBtn/resources/about.

Thanks.

..rick


Leith Ross[_795_]

Excel 2007 vba Is there a way (subroutine or API calls) to get the version of Excel that is running?
 

Ron de Bruin;478856 Wrote:
Use

If Val(Application.Version) < 12 Then
'97-2003
Else
'2007
End If

See also
'Dealing with Ribbons and Menus - Avoiding Two Versions'
(http://www.rondebruin.nl/compatiblemenu.htm)


--

Regards Ron de Bruin
'Ron's Excel Tips' (http://www.rondebruin.nl/tips.htm)




"rick" wrote in message
...
I have done some work with the ribbon as well as some 2007-only vba
constructs and need to determine the level of Excel that opened the

workbook
so I may set the menu bar and command bars properly.

Something like the OBtn/resources/about.

Thanks.

..rick


Hello Rick,

If you need more detail about the version, including major and minor
releases, have a look at this 'How to determine which 32-bit Windows
version is being used' (http://support.microsoft.com/kb/189249).


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=132072



All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com