Macro won't work with Personal.XLS

  • Thread starter Thread starter Kevin W
  • Start date Start date
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!
 
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)
 
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.
 
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)
 
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)
 
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!
 

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

Back
Top