Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sub or fuction not defined

Can anyone help me?
This line of code bring up the message when run "sub or function not
defined" and highlights the acos in the code.
Cells(i, 2) = Cos([L2] * Acos(Cells(i - 1, 2) / Radical))
I've tried alot- can you help me?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default sub or fuction not defined

Steven,
Acos is an xl Worksheet function, not a VB math Method and should me
addressed as WorksheetFunction.Acos(Cells(i-1,2)/Radical ).
That might be the problem.
Ken Johnson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default sub or fuction not defined

Hi Steven,

ACOS is an Excel worksheet function, so try changing Acos to
Application.ACOS


---
Regards,
Norman



"Steven" wrote in message
.com...
Can anyone help me?
This line of code bring up the message when run "sub or function not
defined" and highlights the acos in the code.
Cells(i, 2) = Cos([L2] * Acos(Cells(i - 1, 2) / Radical))
I've tried alot- can you help me?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default sub or fuction not defined

VBA's help also shows this as a derived math function:

Inverse Cosine
Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)

Steven wrote:

Can anyone help me?
This line of code bring up the message when run "sub or function not
defined" and highlights the acos in the code.
Cells(i, 2) = Cos([L2] * Acos(Cells(i - 1, 2) / Radical))
I've tried alot- can you help me?


--

Dave Peterson
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
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
Application-Defined or Object-Defined Error on simple code Fid[_2_] Excel Programming 1 July 21st 05 08:30 PM
Application-Defined or Object-Defined Error on simple code [email protected] Excel Programming 6 February 22nd 05 09:03 PM
Application-defined or object-defined error - missing the basics [email protected] Excel Programming 1 December 28th 04 10:23 PM
User Defined Fuction Returning Range Help xcelion Excel Programming 7 November 22nd 04 02:39 PM


All times are GMT +1. The time now is 05:43 PM.

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

About Us

"It's about Microsoft Excel"