ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UDFs Worksheet Level (https://www.excelbanter.com/excel-programming/367214-udfs-worksheet-level.html)

Floyd Bates[_2_]

UDFs Worksheet Level
 
All:

Is it possible to use UDFs in a worksheet's code section? If so, how?

I can't seem to get the functions to calculate when called from a
worksheet.

Thanks in advance.


Niek Otten

UDFs Worksheet Level
 
The UDFs should be in a standard module, not in a sheet module. In VBA: InsertModule

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Floyd Bates" wrote in message ups.com...
| All:
|
| Is it possible to use UDFs in a worksheet's code section? If so, how?
|
| I can't seem to get the functions to calculate when called from a
| worksheet.
|
| Thanks in advance.
|



Norman Jones

UDFs Worksheet Level
 
Hi Floyd,

Why would you want to put a udf in a sheet module?

As a rule of thimb, use the worksheet module only for worksheet event code.



---
Regards,
Norman



"Floyd Bates" wrote in message
ups.com...
All:

Is it possible to use UDFs in a worksheet's code section? If so, how?

I can't seem to get the functions to calculate when called from a
worksheet.

Thanks in advance.




Floyd Bates[_2_]

UDFs Worksheet Level
 
My boss wants to have each worksheet as a standalone entity, so that
others can move the worksheets into their workbooks without having to
import/export a VBA module.

Barring rules of thumb, is it possible?





Norman Jones wrote:
Hi Floyd,

Why would you want to put a udf in a sheet module?

As a rule of thimb, use the worksheet module only for worksheet event code.



---
Regards,
Norman



"Floyd Bates" wrote in message
ups.com...
All:

Is it possible to use UDFs in a worksheet's code section? If so, how?

I can't seem to get the functions to calculate when called from a
worksheet.

Thanks in advance.



Norman Jones

UDFs Worksheet Level
 
Hi Floyd,

Try, instead, putting your udf's in an addin.


---
Regards,
Norman



"Floyd Bates" wrote in message
ups.com...
My boss wants to have each worksheet as a standalone entity, so that
others can move the worksheets into their workbooks without having to
import/export a VBA module.

Barring rules of thumb, is it possible?





Norman Jones wrote:
Hi Floyd,

Why would you want to put a udf in a sheet module?

As a rule of thimb, use the worksheet module only for worksheet event
code.



---
Regards,
Norman



"Floyd Bates" wrote in message
ups.com...
All:

Is it possible to use UDFs in a worksheet's code section? If so, how?

I can't seem to get the functions to calculate when called from a
worksheet.

Thanks in advance.






All times are GMT +1. The time now is 04:02 AM.

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