Private Sub Command1_Click()
Me.Font.Size = 40
Dim n1 As Byte, n1Len As Long
Dim n2 As Byte, n2Len As Long
Dim yushu As Byte
Dim shang As Byte
Dim tempresult As Byte
n1 = Int(Val(Me.Text1.Text))
n2 = Int(Val(Me.Text2.Text))
tempresult = n1 * n2
yushu = tempresult Mod 10
shang = tempresult \ 10
Print shang & yushu
End Sub
![]()
Me.Font.Size = 40
Dim n1 As Byte, n1Len As Long
Dim n2 As Byte, n2Len As Long
Dim yushu As Byte
Dim shang As Byte
Dim tempresult As Byte
n1 = Int(Val(Me.Text1.Text))
n2 = Int(Val(Me.Text2.Text))
tempresult = n1 * n2
yushu = tempresult Mod 10
shang = tempresult \ 10
Print shang & yushu
End Sub
本文详细介绍了如何使用Visual Basic for Applications (VBA)在Excel中进行复杂数学计算,包括利用宏和函数来实现乘法运算并打印结果。
3044

被折叠的 条评论
为什么被折叠?



