How do I use the excel function ATAN in a module used in excel

G

Guest

I have written a module(function) to use it as a user defined function by
creating a macro
When I use excel trignometric functions like SIN,COS and TAN the function is
getting executed whreas when functions like ASIN,ACOS and ATAN are used in
the module, I get compilation error
I am struggling to get a link
can any one help please?
 
B

Bernie Deitrick

Use

VBA includes its own SIN,COS and TAN , but doesn't include ASIN,ACOS and ATAN , so you need to use"

Application.Asin( )

or

Application.WorksheetFunction.Asin( )

HTH,
Bernie
MS Excel MVP
 
D

Dana DeLouis

As a side note, vba uses Atn( ) for ATAN.
For the op, if you click on vba help for Atn, you can also select "See
Also", and then select "Derived Math Functions." This will list some vba
solutions to Trig functions that are not included in vba.

- -
HTH. :>)
Dana DeLouis
Windows XP, Office 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top