Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Calling a Public Function

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Calling a Public Function

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Public Variables between diff Modules J@Y Excel Programming 3 July 4th 07 06:16 PM
Calling? Invoke Public Function Chip Pearson Excel Programming 0 January 18th 07 10:13 PM
Using A Public Function / carl Excel Worksheet Functions 1 April 6th 06 09:13 PM
Calling a Public Subroutine in a Different Workbook Raul Excel Programming 2 August 24th 05 04:27 AM
Public Function Monty Excel Discussion (Misc queries) 9 December 24th 04 06:35 PM


All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"