Thread: Excel "Add Ins"
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Excel "Add Ins"

Hi Peter,

It probably is quite easy, but I had the impression before I bought it that
it would be just like VBA or VB and that is not the case.
The IDE is not that great either.

RBS


"Peter T" <peter_t@discussions wrote in message
...
Hi Bart,

Thanks for your comments. PowerBasic looks interesting but I note your
comments about not so easy to learn & use, one day perhaps.

Regards,
Peter T

"RB Smissaert" wrote in message
...
Hi Peter,

Haven't looked carefully into what kind of code gets faster and what code
not, but in general I find the speed gain is between very little to a bit
over twice as fast.

Another option to get faster code might be to make a true, normal Windows
dll with PowerBasic.
I got this, but I must admit I didn't find it as easy as it was supposed

to
be and I haven't used it yet.
It has been claimed though that certain types of code can be speeded up
enormously.

Laurent Longre's .xll functions are good as well and I have used his
array
sorting functions, making array sorts
about twice as fast. There was some drawback though, which I can't

remember
now and I am not currently using it in
my commercial app.

RBS


"Peter T" <peter_t@discussions wrote in message
...
Hi Bob & Bart,

With my particular UDF's I only find a relatively small performance
increase
by processing in a VB6 ActiveX dll. Obviously this observation only
applies
to my own functions and my method of implementation. FWIW the dll only
does
calculations like x = y * 2, albeit fairly intensively. Not object
model
things like x = Range("A1") * 2.

Possibly I'm not doing things as efficiently as I might, in particular

my
UDF's exist in the first place in a normal addin like this -

UDF's in a normal addin module. First do a few pre-checks on inputs, eg
check if a input is "acceptable", is it an array, etc. Pass inputs to
my
dll
function to process, then the addin UDF returns result or an array of
results.

Could I do this more efficiently ?

A bit more info - the dll itself is a full app. It uses for other

purposes
the same functions exposed to the UDFs. Instancing for dll class
referenced
by the addin UDF's is GlobalMultiUse, so the dll functions are called
directly by the addin functions.

Regards,
Peter T

"Bob Phillips" wrote in message
...
I agree with Bart on the ActiveX DLL, it is the easiest to get up an
running, VB being similar enough to VBA to make it straightforward.

As well as looking at the formulae, check whether any intermediate
calculations can be used , rather than repeat long calculations many
times.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"RB Smissaert" wrote in message
...
Putting the code in a VB6 ActiveX dll can make it faster as well and
has
the
benefit that it is very easy.
The other thing is to look at are the functions themself and see if
they
can
be speeded up.
Maybe it is worth to post them here.

RBS

"Ben" wrote in message
...
Hi There

I need to add some User Defined Functions to Excel 2003 - the
functions
are
CPU intensive.

The existing spreadsheet has the functions written in Excel VBA
(as
an
XLA
add in), and they are very slow.

What are my choices ? Is this correct:
(1) Write an XLL in C++
(2) Write a COM Add in in C++
(3) Write a COM Add in in C#
(4) Write an Automation Add In in C#

Has anyone done any comparisons on the performance of XLL's in C++
versus
Automation Add Ins in C# ? I suppose C# is a great deal slower
because
of
the Interop ?

TIA