Thread: Pi in VBA?
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Pi in VBA?

I like that one... I would never have thought to use the ArcTangent but it
makes sense. I guess that is why they pay you the big money. That being said
I would be inclined to just use the constant and avoid the overhead of a
function. Why calculate a constant?
--
HTH...

Jim Thomlinson


"Rick Rothstein" wrote:

You didn't like this one?

PI = 4 * ATN(1)

--
Rick (MVP - Excel)


"Prof Wonmug" wrote in message
...
On Tue, 28 Apr 2009 15:56:17 +1000, "AltaEgo" <Somewhere@NotHere
wrote:

Set a variable and use the variable

PI = Application.WorksheetFunction.Pi()

C = 2*PI*R


Yep, that's probably the best I can do. Thanks.