Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default 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."
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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."

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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."


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modified ACOS function danpt Excel Discussion (Misc queries) 4 November 3rd 08 08:17 AM
User Function Question: Collect Condition in Dialog Box - But How toInsert into Function Equation? SteveM Excel Programming 1 January 3rd 08 03:45 PM
Function ACOS in Excel VBA mario Excel Programming 3 October 11th 07 05:49 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Acos Function No Name Excel Programming 1 June 22nd 04 10:16 PM


All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"