1
我对VBA很新。如果我的问题很简单,我很抱歉。我有个问题。当我运行下面的代码,我得到了以下错误消息:VBA错误:检测到模糊名称(Excel 2010)
编译器错误:检测明确名称:发轫
任何人都可以请解释一下我的代码部分是错误的?
Option Explicit
Dim n As Double
Private faren As Integer
Dim result As Double
Function faren(n)
faren = (9/5) * (n + 32)
End Function
Function c(n)
Dim c As Long
c = (5/9) * (n - 32)
End Function
Sub test()
result = faren(32)
MsgBox "the degree in farenheit is " & result & "Farenheit."
End Sub
谢谢您的澄清! :-) –