View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Writing a user-defined worksheet function

Public functions can be used by procedures in other modules while private
functions cannot be accessed by procedures in other modules.

If not specified, functions are public by default - so the answer to your
question is there is no difference.

Check VBA help for "Function Statement"

"Russell Seguin" wrote:

What's the difference between a Function and a Public Function?

Thanks!

Russell

"merjet" wrote:

Put this in a standard module.

Public Function pw(TempC As Double) As Double
pw = 760 * Exp(11.8571 - (3840.7 / (TempC + 273.15)) - (216961 /
(TempC + 273.15) ^ 2))
End Function

Hth,
Merjet