Jon

Many worksheet functions are available in VBA. Usually the ones that are

not available are duplicated by VBA functions. In this case, however, the

worksheetfunctions are available:

Application.Degrees(Application.Asin(.5))

returns 30

Application.Degrees(Application.Radians(30))

Returns 30

Application.Pi()

Returns 3.14159265358979

Sin is available directly,

Degrees, Radian, Pi, Asin are available in VBA as methods of the Application

Object.

HTH,

Tom Ogilvy

Quote:

>I want to use Asin in VBA and I keep getting a sub or function not defined

error.

>I have the same problem with Degrees.

>How can I convert the Sin to Asin if this method is not available. Then how

can I

>convert to degrees ??

>It was told that their is no Radians function and that I should make one.

>This is what I did.

>Const Pi = 3.1416

>Function Rads(Degs as Double) As Double

> Rads = Degs * 0.01745 'degs * (pi/180)

>End Function

>Here is my code :

> If Sheet1.Cells(3, 8) And Sheet1.Cells(5, 8) <> "" Then

> Number = Sin(Rads(Sheet1.Cells(3, 8) / Sheet1.Cells(5, 8)))

> Sheet1.Cells(9, 8) = Number

> End If

>I'm not very good with math so I would appreciate if you take that into

>consideration.

>jon