use of morefunc functions in excel macros

K

K7

Hello all!

I'm writing a macro and I'd like to use one of the functions included in
Longre's free morefunc.xll add-in from http://xcell05.free.fr/

I'm interested in using UniqueValues but I don't manage it to work.

For example, an very simple code like this:


Sub ExtractItems()

Dim i As Integer
Dim list As Variant
Dim DataRange As Range

Set DataRange = Worksheets("Hoja1").Range("$A$1:$B$4")

list = uniquevalues(DataRange)

End Sub


doesn't work at all (plus, I get an error).

Sorry, I forgot to mention that I've already checked that the add-in is
properly loaded.

Can you help me with this?

Many thanks in advance.
 
R

Ron Rosenfeld

Hello all!

I'm writing a macro and I'd like to use one of the functions included in
Longre's free morefunc.xll add-in from http://xcell05.free.fr/

I'm interested in using UniqueValues but I don't manage it to work.

For example, an very simple code like this:


Sub ExtractItems()

Dim i As Integer
Dim list As Variant
Dim DataRange As Range

Set DataRange = Worksheets("Hoja1").Range("$A$1:$B$4")

list = uniquevalues(DataRange)

End Sub


doesn't work at all (plus, I get an error).

Sorry, I forgot to mention that I've already checked that the add-in is
properly loaded.

Can you help me with this?

Many thanks in advance.

To use morefunc functions within a VBA macro, you can use the RUN command:

========================
list = Run([uniquevalues], DataRange, 1)
=========================

See morefunc HELP for more information on "calling XLL functions in VBA"





--ron
 

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