My Excel addin requires the Visual Basic for Applications option of Excel to be installed in order for it to work. I would like my install (which is written with InnoSetup) to be able to detect if VBA is installed and warn the user if it is not.
How can I detect if the option is already installed?
Answer: Select the Tools drop-down menu. Look for the Visual Basic for Applications option. If it is available, then the VBA module has been installed.
VBA is a programming language that was developed by Microsoft Corp., and it is integrated into the major Microsoft Office applications, such as Word, Excel, and Access. The VBA programming language allows users to access functions beyond what is available in the MS Office applications.
One possibility is to check for the presence of VBE6.DLL in C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6. Or poke about in the registry looking for references to that DLL or the string VBA.
Note that this location/file name might be different for Office 2010 as there are some changes in the VBA editor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With