Macro won't work with Personal.XLS

K

Kevin W

I copied a macro I felt would be useful
(http://www.xldynamic.com/source/xld.ColourCounter.html) into the workbook I
was using and it worked fine. Wanting to use it at anytime, I tried to copy
the same macro into my personal.xls file. Unfortunately, it doesn't seem to
work there. I tried multiple times. Since it is a FUNCTION as opposed to a
SUB, it is not a MACRO that I can just select and run. I can't seem to
figure out what's wrong. Any thoughts? Thanks!
 
D

Dave Peterson

If you put the code in a General module of your personal.xls workbook's project,
you could use a formula like:

=personal.xls!nameoffunctionhere(argumentsforfunctionhere)
 
K

Kevin W

I don't quite understand. In Microsoft Visual basic, it says the functions
is in PERSONAL.XLS - [Module34 (Code)].

Can you possibly give me the steps in doing this? Thanks for your time.
 
S

ShaneDevenshire

Hi,

Select an empty cell and choose Insert, Function (or its button on the
formula bar)
Choose User Defined under Or select a category. Double-click your custom
function and notice how it is entered in the spreadsheet. If you want to
manually enter it that is what you would need to type, and that is what Dave
is saying.


--
Thanks,
Shane Devenshire


Kevin W said:
I don't quite understand. In Microsoft Visual basic, it says the functions
is in PERSONAL.XLS - [Module34 (Code)].

Can you possibly give me the steps in doing this? Thanks for your time.


Dave Peterson said:
If you put the code in a General module of your personal.xls workbook's project,
you could use a formula like:

=personal.xls!nameoffunctionhere(argumentsforfunctionhere)
 
D

Dave Peterson

What function did you use from that web page?

If you used =colorindex(), you'd use this in a worksheet cell:

=personal.xls!ColorIndex(a1)

The code is fine in that General module.

Kevin said:
I don't quite understand. In Microsoft Visual basic, it says the functions
is in PERSONAL.XLS - [Module34 (Code)].

Can you possibly give me the steps in doing this? Thanks for your time.

Dave Peterson said:
If you put the code in a General module of your personal.xls workbook's project,
you could use a formula like:

=personal.xls!nameoffunctionhere(argumentsforfunctionhere)
 
K

Kevin W

That works. Thank you both

ShaneDevenshire said:
Hi,

Select an empty cell and choose Insert, Function (or its button on the
formula bar)
Choose User Defined under Or select a category. Double-click your custom
function and notice how it is entered in the spreadsheet. If you want to
manually enter it that is what you would need to type, and that is what Dave
is saying.


--
Thanks,
Shane Devenshire


Kevin W said:
I don't quite understand. In Microsoft Visual basic, it says the functions
is in PERSONAL.XLS - [Module34 (Code)].

Can you possibly give me the steps in doing this? Thanks for your time.


Dave Peterson said:
If you put the code in a General module of your personal.xls workbook's project,
you could use a formula like:

=personal.xls!nameoffunctionhere(argumentsforfunctionhere)



Kevin W wrote:

I copied a macro I felt would be useful
(http://www.xldynamic.com/source/xld.ColourCounter.html) into the workbook I
was using and it worked fine. Wanting to use it at anytime, I tried to copy
the same macro into my personal.xls file. Unfortunately, it doesn't seem to
work there. I tried multiple times. Since it is a FUNCTION as opposed to a
SUB, it is not a MACRO that I can just select and run. I can't seem to
figure out what's wrong. Any thoughts? Thanks!
 
Top