You can use Application.Pi. E.g,
(Cos(D1031 * Application.Pi() / 180)......
--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
"Nils Titley" wrote in message
...
I know PI can be used in a formula in for a cell. I am writing a macro to
provide the same formula while process other data.
When I try to use it, I get a compile error, sub or function not defined.
It is a complicated formula but (Cos(D1031 * Pi() / 180)......
Is there some thing I have to use PI?
Thanks