Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know if the VBA component of Office is installed?

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?

alt text

like image 876
Jason Avatar asked Sep 09 '09 16:09

Jason


People also ask

How do I know if VBA is 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.

Is VBA part of Microsoft Office?

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.


1 Answers

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.

like image 180
Tony Toews Avatar answered Oct 02 '22 03:10

Tony Toews