Thread: Pi in VBA?
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dk[_2_] dk[_2_] is offline
external usenet poster
 
Posts: 21
Default Pi in VBA?

On Apr 28, 10:00*am, Prof Wonmug wrote:
What's the best way to get the most accurate value for pi in a VBA
function?

Excel 2007 has a pi() worksheet function, but there doesn't appear to
be a corresponding VBA function. The best I could come up with is

* C = 2 * Application.WorksheetFunction.Pi() * R

That works, but it's a litte messy.


WHY DONT YOU JUST HARD CODE IT ?