I want to use the compiler constant VBC_VER to generate different code for VS 2008 and VS 2010. So, I made a little test:
Under Visual Studio 2010, the enclosed Debug.Print statement is greyed out and does not execute. However from the command prompt I see that:
So, how should I write my #if statement to get the Debug command to compile and execute?
Also, how can I see the value of VBC_VER as it is at compile time?
Code:
#If VBC_VER >= 10.0 Then
Debug.Print("Greater than or equal to 10.0")
#End If
Code:
C:\Program Files\Microsoft Visual Studio 10.0\VC>vbc
Microsoft (R) Visual Basic Compiler version 10.0.30319.233
Copyright (c) Microsoft Corporation. All rights reserved.
Also, how can I see the value of VBC_VER as it is at compile time?