【发布时间】:2013-05-27 03:41:43
【问题描述】:
我正在尝试开发一个MsgBox,它在来自单元格引用的MsgBox 中显示一个问题。
所以在下面的消息“请输入公顷数”的示例中,我想从Worksheet1 cell A1 那里接听。
Sub ComplainceQuestion()
On Error Resume Next
Dim num As Double
Dim Save
num = Application.InputBox(prompt:="Please Enter The Number Of Hectares", Type:=1)
MsgBox Format(num * 2.47105, "#,##0.00") & " Is the Number Of Acre's."
Save = MsgBox("Do you want to paste the result in a cell?", vbYesNo)
If Save = vbYes Then
Cell = Application.InputBox("Type In The Cell Reference, for example 'G64'")
Range(Cell).Value = num * 2.471054
End If
End Sub
【问题讨论】: