Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
I need to create a function that I will use in a worksheet. However, I need to create it in a worksheet code (not in a separate module, but in the "Microsoft Excel Objects"). I know it works for a macro, but not for a function. I tried to call my function with "private function", "public function", but it doesn't work. Thanks for your help guys! Mathieu |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mathieu
Why on earth do you "need to create it in a worksheet code, not in a separate module" ? Insert a regular module and write your function, end users don't care where or how functions are written. HTH. Best wishes Harald "Mathieu936" wrote in message ... Hi! I need to create a function that I will use in a worksheet. However, I need to create it in a worksheet code (not in a separate module, but in the "Microsoft Excel Objects"). I know it works for a macro, but not for a function. I tried to call my function with "private function", "public function", but it doesn't work. Thanks for your help guys! Mathieu |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mathieu
If you put the line below in the separate module your users will not find the function in the list of t category User Defined Option Private Module. HTH, Wouter |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to include the functions in the worksheet code because I have
to copy the worksheet, and I don't want to copy a module with it. That's the only reason. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 1 juin, 13:09, Mathieu936 wrote:
I want to include the functions in the worksheet code because I have to copy the worksheet, and I don't want to copy a module with it. That's the only reason. anyone has an idea? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jun 11, 12:39*pm, Mathieu936 wrote:
On 1 juin, 13:09, Mathieu936 wrote: I want to include the functions in the worksheet code because I have to copy the worksheet, and I don't want to copy a module with it. That's the only reason. anyone has an idea? An alternate approach to worksheet event macro in the sheet. The macro would: 1. test for the existence of a module called mathieu 2. if the module already exists in the work book, just exit 3. create the module 3. populate the newly created module with any functions or sub you need. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use VBA to create new sheet with event handlers in sheet's code | Excel Programming | |||
create new sheet with zip code as name | Excel Programming | |||
Code to create atbs in excel sheet | Excel Discussion (Misc queries) | |||
Code to create tabs in single excel sheet | Excel Discussion (Misc queries) | |||
Code to create and name a sheet | Excel Programming |