Visual Basic code available for all open workbooks

K

KristiB

I found the coding on the Pearson website for how to count cells based on the
color of the cell. WOW! That is just what I have been trying to figure out,
and it works perfectly.

I want to be able to access that coding no matter what workbook I open,
without having to copy the module from one workbook to another each time. I
tried saving it in my Personal Macro Workbook, but that didn't work.

Any suggestions?
 
B

Bob Phillips

What happened when it didn't work?

--

HTH

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

KristiB

I get a #NAME? error, so it is not recognizing the =countbycolor function in
the new workbook.

KB
 
D

Duke Carey

try

=personal.xls!countybycolor(...

KristiB said:
I get a #NAME? error, so it is not recognizing the =countbycolor function in
the new workbook.

KB
 
C

Chip Pearson

Just adding to the others' posts, if you put the function in an
Add-In, you don't need to prefix the call with the workbook name.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top