Public Function to Return ColorIndex

  • Thread starter Thread starter Fries
  • Start date Start date
F

Fries

Hello,

I made (copied) a function that returns the Index of the background of
a cell.

I saved it in a module in my Personal.xls workbook.

Having done that, I thought I´d be able to use it like:
=GetColorIndex(B5)

But... I have to use it like: =Personal.xls!GetColorIndex(B5)

Is there a way to achieve the first option, simply =GetColorIndex(B5)
without the Personal.xls! part before the function?

thanks,

Fries
 
Hi Fries,

One way:

In the VBE set a reference to your Personal.xls workbook:

Tools | References | Scroll to and tick the Personal.xls project

You can then use Personal.xls functions like functions native to the
workbook.

This requires that the workbook using such functions is a workbook which
has been saved at least once.

---
Regards,
Norman



Hello,

I made (copied) a function that returns the Index of the background of
a cell.

I saved it in a module in my Personal.xls workbook.

Having done that, I thought I´d be able to use it like:
=GetColorIndex(B5)

But... I have to use it like: =Personal.xls!GetColorIndex(B5)

Is there a way to achieve the first option, simply =GetColorIndex(B5)
without the Personal.xls! part before the function?

thanks,

Fries
 
Hi Fries,

Also, functions stored in an Addin can be accesed like native functions.

---
Regards,
Norman



Hello,

I made (copied) a function that returns the Index of the background of
a cell.

I saved it in a module in my Personal.xls workbook.

Having done that, I thought I´d be able to use it like:
=GetColorIndex(B5)

But... I have to use it like: =Personal.xls!GetColorIndex(B5)

Is there a way to achieve the first option, simply =GetColorIndex(B5)
without the Personal.xls! part before the function?

thanks,

Fries
 

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