View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Debu Debu is offline
external usenet poster
 
Posts: 6
Default I get this error: Sub or Function Not Defined

Sorry, I forgot to mention that I did use Power in place of Sqrt (or Sqr)
function. Regards, Debu

"Debu" wrote:

Apart from changing Sqrt to Sqr, I also included Application.WorkseetFunction
in front of the worksheet functions and it worked perfect!! Thank you Niek
for your response.

Best regards,
Debu

"Niek Otten" wrote:

HI Debu,

Check VBA's HELP for the syntax of the functions, like Sqr (not Sqrt).
There are more subtle differences.
You can often access the worksheet function version like with Application.Worksheetfunction.Sqrt , but even that is not always
true.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Debu" wrote in message ...
|I wrote a simple function in visual basic that uses Sqrt(), NormDist(), and
| Power() functions. I can use these functions in any worksheet, but when I
| include them in the Visual Basic function, it says "Sub or Function Not
| Defined" for each of the above functions. However, it did not complain for
| the Log() function though.
|
| Help from Microsoft says that I should find WPS.EXE file, compile it from
| some other computer, and then ... - totally over my head since I have no clue
| what it is asking me to do. Wondering if you would have any simple and
| reliable solution?
|
| Regards,
| Debu