PC Review


Reply
Thread Tools Rate Thread

Calling a Public Function

 
 
David
Guest
Posts: n/a
 
      28th Sep 2007
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

 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      28th Sep 2007
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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a public function from within a report? rick Microsoft Access Reports 2 12th Jun 2009 02:16 AM
Calling a public function from a worksheet JWirt Microsoft Excel Programming 5 19th Sep 2008 04:22 PM
Calling Public Function nomadk Microsoft Access Form Coding 2 2nd Sep 2008 02:32 PM
Calling a Public Function tobesurveyor via AccessMonster.com Microsoft Access VBA Modules 3 28th Apr 2006 09:13 AM
Calling public function from a control George Papadopoulos Microsoft Access 4 5th Apr 2004 02:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:23 PM.