I would like to expand some of my macro functions so they work under multiple versions of Excel. With most languages I would use compile time directives. Visual Basic has these options but there are very few constants defined. If I do not use compile time directives then the code will not compile (certain functions can not be resolved). I only care about 2007 and 2010 versions (I use #vba defines for the older versions).
Is there a way of determining Excel's version number for use in compile time directives?
for 2010.#If Vba7 Then
You can also simply put 2010 specific code into a separate module and use a check on Application.Version - you won't be able to compile the project, but it will work at runtime.
Not sure if it helps with your problem but
Will return the version of excel you are currently usingapplication.Version
Thanks romper, that fixed it...
Glad to help.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks