(VBA)単精度浮動小数点型変数

Private Sub CommandButton1_Click()

Dim a As Single, b As Single, c As Single
a = Cells(13, 2)
b = Cells(14, 2)
c = Cells(15, 2)
Cells(16, 2) = a + b + c
Cells(17, 2) = a * b / c
Cells(18, 2) = (a + b) / c
Cells(19, 2) = a * (b + c)
End Sub


Private Sub CommandButton2_Click()
Range(Cells(13, 2), Cells(19, 2)).Select
Selection.ClearContents
Cells(13, 2).Select
End Sub

posted @ 2014-04-15 10:37  kumadou  阅读(296)  评论(0编辑  收藏  举报