Results 1 to 2 of 2

arctan in vba

This is a discussion on arctan in vba within the Excel Questions forums, part of the Question Forums category; Code: Az = Application.WorksheetFunction.Atan(Application.WorksheetFunction.Radians(((Abs(N_0 - N_1)) / (Abs(E_0 - E_1))))) When I try to run this I get a runtime ...

  1. #1
    Board Regular
    Join Date
    May 2010
    Posts
    93

    Question arctan in vba

    Code:
    Az = Application.WorksheetFunction.Atan(Application.WorksheetFunction.Radians(((Abs(N_0 - N_1)) / (Abs(E_0 - E_1)))))
    When I try to run this I get a runtime error 438. It's probably something pretty simple that I am just blanking on. any ideas or suggestions?

  2. #2
    Board Regular
    Join Date
    Jan 2010
    Location
    MN, USA
    Posts
    454

    Default Re: arctan in vba

    Unless I'm mistaken, WorksheetFunction.Atan() isn't included by MicroSoft in its list of available functions...

    http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

    Fortunately, VBA has it's own function Atn().

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com