Calling a Public Function

  • Thread starter Thread starter David
  • Start date Start date
D

David

I'm probably doing something really stupid here, I've got a Public
Function:

Public Function Repayment_Calculator(iRepayment, iTerm)

But when I try to call it from another module like this:

cur_0Tap = Repayment_Calculator(0, int_term)

I get this error:

Sub or function not defined.

So, what did I do wrong this time?

Thanks as usual!

David
 
David,
Your public function should be in a standard module.
Functions are private if they are in ThisWorkbook module or in a
module behind a sheet.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"David"
wrote in message
I'm probably doing something really stupid here, I've got a Public
Function:

Public Function Repayment_Calculator(iRepayment, iTerm)
But when I try to call it from another module like this:

cur_0Tap = Repayment_Calculator(0, int_term)

I get this error:
Sub or function not defined.
So, what did I do wrong this time?
Thanks as usual!
David
 

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