ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
THTyler Hilgendorf29/08/2017

I am writing a macro that references Microsoft Excel 14.0 Object Library. The problem is, some of our computers have an older version of excel, so they only have the 12.0 library. If I am on one of those computers and try to run or edit the macro, it either throws an error and I have to manually change the reference, or it completely crashes Solidworks, corrupts the macro, and I have to rebuild it by importing all the files.

Is it possible, at the beginning of my macro, to have a check in the actual code that looks to see which library is available, and use that one?