Function written in VBA not recognized

  • Thread starter Thread starter Thrava
  • Start date Start date
T

Thrava

Hi folks,
I wrote a simple Function in VBA that I know it works when
I test it in VBA, which I named LogRatio which takes two
paramerters.... LogRatio(a,b)
But when I use this function in the application, in one of
the cells.. such as =LogRatio(3,5)

I get an error message of #Name?

Any idea why the function, though its Public, is not
recognized in the same sheet that I wrote the VBA code?

Thanks
 
Hi

Are you sure you did write an function - maybe it was a procedure.
Maybe post your code here - it's impossible to decide what is wrong without.
 
Write the function in a General Module, not a Sheet Module

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
and not ThisWorkbook.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Thank you all for responding,
Yes, I've placed the code in General module and now it is
recognized.
Thank you again
Trava
 
Back
Top