Public Function Area(A As String, D As Double) As Double'A是截面形状,D是直径
Dim M As String '面积表达式
M = DLookup("面积", "表1", "截面形状='" & A & "'")
Area= 3.14 * D ^ 2 / 4 '如何将这字串表达转换数据计算式!!!
End Function
多谢指教!
Public Function Area(A As String, ...
kennylee 发表于 2010-9-18 23:36
Public Function Area(A As String, D As Double) As Double'A是截面形状,D是直径
Dim M As String '面积表达式
M = DLookup("面积", "表1", "截面形状='" & A & "'")
M=Replace(M,"D",D)
Area=Eval(M)
End Function