Posted to microsoft.public.excel.programming
|
|
VBA -vs- VB
Thanks for the info.
Bill
--------------------
"RB Smissaert" wrote in message
...
If you take your VBA code and put it in a VB6 ActiveX dll and use that dll
you may get some increased speed but not that much. I found it in the
order of 50% to 100% increase, depending of course what the VBA code is.
Usually there is more gain if you optimize your VBA code.
Still, moving to a VB ActiveX dll is very easy and you have the added
bonus of good code protection if you needed that.
RBS
"Bill Martin" wrote in message
...
The reason for that sort of comparison is that I have moderately large
spreadsheets where I use VBA to do a lot of repetitive Monte Carlo
optimization. At times I've been tempted to port it out to C code, but I
never personally liked C and never been motivated enough to actually do
it anyhow.
I was just curious if VB would give fully compiled performance, and yet
be a higher level language than C to program in. Presumably various bits
of VBA code could be ported more easily into VB than into C?
The easy solution would be to just get a much faster computer, but...
Bill
------------------------------
"Jim Rech" wrote in message
...
VBA is tokenized. I don't know about a VB EXE or DLL. But why compare
Excel VBA to standalone VB? You should be comparing Excel to standalone
VB. Excel can do calculation far faster than VBA.
--
Jim
"Bill Martin" wrote in message
...
Does someone have a feel for the relative speeds of VBA -vs- Visual
Basic? For a computationally intensive application say for simplicity.
Calculating the nth digit or pi or whatever?
It's not clear to me what "compiled" means anymore. People refer to
VBA being compiled, but I've never felt comfortable whether it is
really fully compiled down to optimized executable code (like C say),
or whether it's actually tokenized -- something between interpreted and
compiled. And I know even less about Visual Basic.
Thanks.
Bill
|