Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Program:
Pi=Application.WorksheetFunction.Pi If z/m=Pi/2 or z/m=3*P/2 Then Msgbox("N/A") Else n = Function.WorksheetFunction.Acos(z/m) End If Error code: Run-time Error '1004': Unable to get the Acos property of the WorksheetFunction. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try it without the "Function." part...
n = WorksheetFunction.Acos(z/m) You also do not need to specify the Application object in your first line... Pi = WorksheetFunction.Pi -- Rick (MVP - Excel) "Philosophaie" wrote in message ... Program: Pi=Application.WorksheetFunction.Pi If z/m=Pi/2 or z/m=3*P/2 Then Msgbox("N/A") Else n = Function.WorksheetFunction.Acos(z/m) End If Error code: Run-time Error '1004': Unable to get the Acos property of the WorksheetFunction. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
n = WorksheetFunction.Acos(z/m) If z/m=Pi/2 or z/m=3*P/2 Then Msgbox("N/A") Else... whatever... Note that for a Real solution, z/m should be in the Range -1 to +1. So numbers near Pi/2 and 3 Pi/2 would return complex numbers. = = = = = = = Dana DeLouis On 11/19/09 8:45 PM, Philosophaie wrote: Pi=Application.WorksheetFunction.Pi If z/m=Pi/2 or z/m=3*P/2 Then Msgbox("N/A") Else n = Function.WorksheetFunction.Acos(z/m) End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems with WorksheetFunction.Index and WorksheetFunction.Match | Excel Programming | |||
Acos function | Excel Programming | |||
Modified ACOS function | Excel Discussion (Misc queries) | |||
Function ACOS in Excel VBA | Excel Programming | |||
Acos Function | Excel Programming |