Private Sub Command1_Click()'æé®ä¸ï¼-50ï¼50ï¼
Dim n1 As Long, n2 As Long, n As Long
Randomize
n1 = -50: n2 = 50
n = Int(((n2 - n1) + 1) * Rnd + n1)
Label1 = n
End Sub
Private Sub Command2_Click()'æé®äºï¼0,99.99ï¼
Dim n1 As Double, n2 As Double, n As Double
Randomize
n1 = 0: n2 = 99.99
n = Format((n2 - n1 + 1) * Rnd + n1, ".00")
Label1 = n
End Sub
追é®
追çcommad1 commadn2ä½ èªå·±å¾ç»å°çªä½ä¸åã
åªæ¯ç»ä½ æä¾ç»ä»£ç ï¼ä½ æ»ä¸è½å¤å¶ä¸å°±è¡äºå§ã