2014-02-08 66 views
2

爲什麼先爭優不斷告訴我弧度的內部函數沒有被定義弧度內部函數沒有定義

這裏是我的函數的定義:

Public Function Ev(x As Double, length As Integer, beta As Double, curvature As Double) As Double 
    Dim height As Double 

    beta = Radians(beta) 
    height = Round(length * Tan(beta), 0) 
    Ev = height * (1 - (x/length))^curvature 

End Function 

Err Screenshot

回答

3

爲什麼先爭優不斷告訴我弧度內函數沒有定義?

因爲它不存在存在!

使用WorksheetFunction代替:

beta = Application.WorksheetFunction.Radians(beta)