![]() |
Acos function
I am trying to use the Acos function in my code:
y = Application.WorksheetFunction.Acos(x) but it keeps giving me an error: "Unable to get the Acos property of the WorksheetFunction class." |
Acos function
Sub dural()
Dim x As Double x = 0.1 MsgBox (Application.WorksheetFunction.Acos(x)) End Sub Seems to work. Have you declared x to be double in your code?? -- Gary''s Student - gsnu200901 "Philosophaie" wrote: I am trying to use the Acos function in my code: y = Application.WorksheetFunction.Acos(x) but it keeps giving me an error: "Unable to get the Acos property of the WorksheetFunction class." |
Acos function
What do you get when you run this?
x = 0.1 y = Application.WorksheetFunction.Acos(x) MsgBox y Gord Dibben MS Excel MVP On Sat, 22 Aug 2009 10:55:01 -0700, Philosophaie wrote: I am trying to use the Acos function in my code: y = Application.WorksheetFunction.Acos(x) but it keeps giving me an error: "Unable to get the Acos property of the WorksheetFunction class." |
Acos function
On Sat, 22 Aug 2009 10:55:01 -0700, Philosophaie
wrote: I am trying to use the Acos function in my code: y = Application.WorksheetFunction.Acos(x) but it keeps giving me an error: "Unable to get the Acos property of the WorksheetFunction class." What is your value for "x"? If it is not in the range of possibility (i.e. -1 to 1) you will see that error message. --ron |
All times are GMT +1. The time now is 05:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com