ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Compilation using Application.Version (https://www.excelbanter.com/excel-programming/316113-re-conditional-compilation-using-application-version.html)

Dave Peterson[_4_]

Conditional Compilation using Application.Version
 

Chip Pearson posted this:

You can use Conditional Compilation combined with CallByName to
do what you want. For example,

#If VBA6 Then
If CInt(Application.Version) 9 Then
' Excel 2002 or 2003
CallByName Application.CommandBars, "DisableCustomize", VbLet, True
Else
' Excel 2000
End If
#Else
' Excel 97
#End If

Philip wrote:

Hi,

I need to do something like this:

#If Application.Version = 11 Then
Application.CommandBars.disablecustomize = True
#End If

the reason is, the desktop pc's are being migrated from Office 2000 to
Office 2003 and I want this code to run if the version is greater then 11
(Office 2002 ?)

The 'disablecustomize' member is not available in Office 2000...

So how can I do this...?

thanks

Philip


--

Dave Peterson



All times are GMT +1. The time now is 02:54 AM.

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