Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling build in functions from user functions 1

Status
Not open for further replies.

KaiDaniel

Programmer
Jun 4, 2002
7
DE
Hello,

I want to write my own function that uses the result of a standard function of Excel (e.g. SUM, WEIBULL,...).
This means I want to call a function, you normaly call on your spreadsheet like this: =SUM(1;2;3)
But I want to do it from within my own VBA function.

Does anyone know how to do this.
Thanks for your help.
Kai.

 
Hi KaiDaniel,

Use the WorksheetFunction Property. SUM is a rather pointless one to use but as an example ..

Code:
Application.WorksheetFunction.Sum(1, 2, 3)

.. returns 6.

Enjoy,
Tony

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top