ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   EXcel Functions in VBA (https://www.excelbanter.com/excel-programming/379233-excel-functions-vba.html)

Tony McGee

EXcel Functions in VBA
 
I have written an addin which amongst other things has some custom functions
available for general use (under the User Defined Category) once the addin
is installed.

However, I also have some functions I would only like available for use by
my VBA code. Is there any way I can make these functions "publically
available" to all of my code, but NOT appearing in the Excel Insert Function
list.

Thanks
Tony McGee



NickHK

EXcel Functions in VBA
 
Tony,
Does Option Private Module do what you need ?

NickHK

"Tony McGee" wrote in message
...
I have written an addin which amongst other things has some custom

functions
available for general use (under the User Defined Category) once the addin
is installed.

However, I also have some functions I would only like available for use by
my VBA code. Is there any way I can make these functions "publically
available" to all of my code, but NOT appearing in the Excel Insert

Function
list.

Thanks
Tony McGee





Bob Phillips

EXcel Functions in VBA
 
To add to Nick's response, you would put those functions in a separate
module, you wouldn't want to Option Private to apply to the other truly
Public functions.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"NickHK" wrote in message
...
Tony,
Does Option Private Module do what you need ?

NickHK

"Tony McGee" wrote in message
...
I have written an addin which amongst other things has some custom

functions
available for general use (under the User Defined Category) once the
addin
is installed.

However, I also have some functions I would only like available for use
by
my VBA code. Is there any way I can make these functions "publically
available" to all of my code, but NOT appearing in the Excel Insert

Function
list.

Thanks
Tony McGee







PSL

IF Function
 
Hi,

Could u please help me on the following issue:

If I given item code in A1 as 123 then B1 should display as "PEN":

I need to execute the Item Name in a cell B1 when I enter the Item Code in A1.

Examples:
------------
If I given item code in A1 as 123 then B1 should display as "PEN"
If I given item code in A2 as 124 then B2 should display as "PAPER"

Like this I have 18 Item Code were there.

Please help on this.

Thank You,
PSL

NickHK

IF Function
 
You should start a new thread, as this has nothing to do with the OP's
question.
Anyway, sounds like you need VLOOKUP.

NickHK

"PSL" wrote in message
...
Hi,

Could u please help me on the following issue:

If I given item code in A1 as 123 then B1 should display as "PEN":

I need to execute the Item Name in a cell B1 when I enter the Item Code in

A1.

Examples:
------------
If I given item code in A1 as 123 then B1 should display as "PEN"
If I given item code in A2 as 124 then B2 should display as "PAPER"

Like this I have 18 Item Code were there.

Please help on this.

Thank You,
PSL




Bob Phillips

IF Function
 
Maybe extend this

=CHOOSE(A1-122,"Pen","Paper")

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"PSL" wrote in message
...
Hi,

Could u please help me on the following issue:

If I given item code in A1 as 123 then B1 should display as "PEN":

I need to execute the Item Name in a cell B1 when I enter the Item Code in
A1.

Examples:
------------
If I given item code in A1 as 123 then B1 should display as "PEN"
If I given item code in A2 as 124 then B2 should display as "PAPER"

Like this I have 18 Item Code were there.

Please help on this.

Thank You,
PSL





All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com