VBA¤ÇŽÌŽ×Ž¯Ž¼Ž±é»»¥²¡¼¥à¤òºî¤ë¡¡
¿À·Ð¿ê¼å¥²¡¼¥à£²
¥¤¥ó¥¿¡¼¥Ð¥ë¥¿¥¤¥Þ¡¼¤ò¼Â¸½
ɸ½à¥â¥¸¥å¡¼¥ë¤Ë
Public Sub customTimer(timeSpan)
Dim startTime
startTime = CDbl(Timer)
Do While Timer < startTime + timeSpan
DoEvents
Loop
End Sub
¥Õ¥©¡¼¥à¤Ë
Dim g, z, zz, no, sei, kt, t, y
Private Sub CommandButton1_Click()
If z <= 5 Then
y = Int(Rnd() * 13 + 1)
TextBox1 = y
z = z + 1
TextBox1 = z
If y = 1 Then Image15.Picture = Image1.Picture
If y = 2 Then Image15.Picture = Image2.Picture
If y = 3 Then Image15.Picture = Image3.Picture
If y = 4 Then Image15.Picture = Image4.Picture
If y = 5 Then Image15.Picture = Image5.Picture
If y = 6 Then Image15.Picture = Image6.Picture
If y = 7 Then Image15.Picture = Image7.Picture
If y = 8 Then Image15.Picture = Image8.Picture
If y = 9 Then Image15.Picture = Image9.Picture
If y = 10 Then Image15.Picture = Image10.Picture
If y = 11 Then Image15.Picture = Image11.Picture
If y = 12 Then Image15.Picture = Image12.Picture
If y = 13 Then Image15.Picture = Image13.Picture
g = g + y
TextBox2 = g
End If
End Sub
Private Sub CommandButton2_Click()
Image15.Picture = Image14.Picture
z = 0
kt = kt + 1
y = Val(TextBox2)
If y = g Then
TextBox1 = "good"
sei = sei + 1
Else
TextBox1 = g
TextBox1 = "Åú¤¨¤Ï" + TextBox1
End If
TextBox3 = kt
TextBox4 = sei
g = 0
End Sub
Private Sub CommandButton3_Click()
g = 0
t = 1
t = Val(TextBox5)
For zz = 1 To 6
Rem 0.3ÉÃ
customTimer (0.3)
CommandButton1_Click
customTimer (t)
Image15.Picture = Image14.Picture
Next zz
End Sub
Private Sub SpinButton1_Change()
TextBox5 = SpinButton1.Value / 50
End Sub
Private Sub UserForm_Initialize()
SpinButton1.Value = 25
End Sub
Private Sub CommandButton4_Click()
StartMidi
End Sub
Private Sub CommandButton5_Click()
StopMidi
End Sub