Debug/Compile: Compilng excel macros? What it generates?

F

faustino Dina

What the "Debug/Compile" menu does on the Excel's Visual Basic window? Which
kind of files it generates? xll? How can I create .xll files for Excel
add-ins?

Thanks in advance
Faustino
 
J

Jim Rech

It does not do a compile in the sense of a traditional programming language.
There is no output; all it does is internally convert the code to
pseudo-code, and in the process checks for syntax errors. Frankly, I never
use it.
 
K

Keith Willshaw

faustino Dina said:
What the "Debug/Compile" menu does on the Excel's Visual Basic window?

Does an internal compile of the P-codes used
at runtime, these are stored in the workbook .xls file
Which kind of files it generates? xll?
None

How can I create .xll files for Excel add-ins?

xll files are built using C++ , unless you are an
experienced C++ programmer you will be better
off with either a VB Com Addin (Excel 2000 and later)
which is typically in a .dll file. For this you will need
either a full copy of VB6/VB.Net or the Office 2000
Developer edition

Alternatively use standard VBA addin which is stored in a .xla
file.

A VBA addin is essentially a workbook who's
IsAddIn property is set to True.

The Public functions and subs in the workbook are
available to any other workbook in which its installed
but do not appear in the workbook macro list and
the code can be password protected.

Keith
 
T

Tim Childs

Jim

PMFJI, don't you ever get those undeclared variable errors when you run the
initial code? The compile option is really good for showing those up early.
Or am I missing something in your approach?

Regards

Tim
 
J

Jim Rech

PMFJI, don't you ever get those undeclared variable errors when you run
the
initial code?

I guess not. Just kidding, of course I do but whenever I write a procedure
I test it immediately so, with Option Explicit set, undeclared variables and
other problems pop up immediately. No harm in doing a compile except it
bloats file size, if that's an issue. I know that "compiling" is supposed
to speed up code running initially since Excel doesn't have to compile it at
run-time, but I've never experienced this time savings/penalty as a
practical matter. Just my opinion of course.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top