PC Review


Reply
Thread Tools Rate Thread

Acos function

 
 
Philosophaie
Guest
Posts: n/a
 
      22nd Aug 2009
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."
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      22nd Aug 2009
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."

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      22nd Aug 2009
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
<(E-Mail Removed)> 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."


 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      22nd Aug 2009
On Sat, 22 Aug 2009 10:55:01 -0700, Philosophaie
<(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Acos trig function Philosophaie Microsoft Excel Programming 3 20th Mar 2010 10:12 AM
Public Function Acos David McKnight Microsoft Access Queries 4 6th Jun 2009 08:43 PM
Modified ACOS function danpt Microsoft Excel Misc 2 3rd Nov 2008 12:21 AM
The ACOS function =?Utf-8?B?Q2hhcmxlcyBUYW0=?= Microsoft Access Form Coding 1 15th Feb 2005 07:25 PM
Acos Function Microsoft Excel Programming 1 22nd Jun 2004 10:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:31 PM.