Questions about VBA / Excel executable program generation

3

I compiled a VBA program that interacts with an Excel spreadsheet. After no more crashes pointed to when compiling, compilation is performed and no action is presented at the end.

I did not find the executable program in any folder (if it was generated).

When searching on the subject, I had more doubts:

Is it possible to generate the VBA executable program that makes use of Excel spreadsheets? There are indications that in these cases an Excel compatible version must be installed on every computer on which it will run, precisely by making use of the worksheet and needing Excel.

If the build generated the executable program, where is the file being saved? There are indications of directory names that I can not find, for example, "BIN".

I would like to know what actually happens and how should I proceed to generate and install the generated program on other computers.

    
asked by anonymous 01.04.2016 / 02:53

1 answer

5

VBA, which stands for Visual Basic for Applications , is an interpreted language created by Microsoft to allow the automation of some processes in their applications (hence the name Visual Basic for Applications). Because it is an interpreted language, there is no executable generation. A specific module, shared by all applications that use VBA, is responsible for interpreting the code written in that language, directly from the application that uses it. This is why VBA has the general instructions / commands (and the specific ones) of each application (in Excel, there are classes to manipulate spreadsheets in Word to manipulate text styles in Powerpoint to manipulate shapes and slides, etc.).

I do not know if there are any robust or well-functioning VBA compilers, but I suspect that there will be fewer. After all, if your idea is to make an executable, you can use any other language (including Visual Basic) to access and / or manipulate Office files via specific libraries. The only use for a VBA code compilation in executable that I see would be to make it difficult to access your code, but even then it is possible to protect the projects within the Office tools and achieve this behavior without having to generate anything external.

Anyway, when I did a Google search I found some options like this VbaCompiler (which seems to generate a DLL from the code). I do not know it, and I do not know if it works as expected.

    
01.04.2016 / 03:44