Excel ¤ËÉÕ°¤¹¤ë¡¡Visual Basic Editer
6ÆüÌÜ
¥È¥é¥ó¥×¥²¡¼¥à¤òºî¤ë
£¡¡¥Ð¥«¥é
¥²¡¼¥àÀâÌÀ¡¡¥ë¡¼¥ë
´Êñ¤Ê¥×¥í¥°¥é¥à¤òºî¤ì¤ë¤è¤¦¤Ë²òÀ⤷¤Þ¤¹
¤³¤³¤Ç¤Ï¥ß¥Ë¥×¥í¥°¥é¥à¤ÎºîÀ®²áÄø¤òÂ賤·¤Æ¤¯¤À¤µ¤¤¡£
¤Ï¤¸¤á¤Ë
¡¡¡¿ô»ú¤Î¤ß¤Îɽ¼¨¤Çºî¤ë
¢¡¡¥«¡¼¥É¿Þ¤òÆɤ߹þ¤ßɽ¼¨¤¹¤ë
£¡¡²»³Ú¤òÆþ¤ì¤ë
£¡¡¥«¡¼¥É¤Î³¨¤ò¼è¤ê¹þ¤à£²
image20¤Ë΢Ì̤ò¡¢image£²£±¤òºî¤ë
¼¡¤ÎÍÄ¤Ë¥×¥í¥°¥é¥à¤ò½¤Àµ¤¹¤ë¡£¡ÚÀÖ¿§¡Û
Dim a, b, c, d, e, f, x, y, kane, kake, flag, aa, bb, cc, dd, ee, ff, g
Private Sub cardhai()
If g = 1 Then Image21.Picture = Image7.Picture
If g = 2 Then Image21.Picture = Image8.Picture
If g = 3 Then Image21.Picture = Image9.Picture
If g = 4 Then Image21.Picture = Image10.Picture
If g = 5 Then Image21.Picture = Image11.Picture
If g = 6 Then Image21.Picture = Image12.Picture
If g = 7 Then Image21.Picture = Image13.Picture
If g = 8 Then Image21.Picture = Image14.Picture
If g = 9 Then Image21.Picture = Image15.Picture
If g = 10 Then Image21.Picture = Image16.Picture
If g = 11 Then Image21.Picture = Image17.Picture
If g = 12 Then Image21.Picture = Image18.Picture
If g = 13 Then Image21.Picture = Image19.Picture
End Sub
Private Sub CommandButton1_Click()
kane = 1000
kake = 100
TextBox8 = kane
TextBox9 = kake
End Sub
Private Sub CommandButton2_Click()
Image1.Picture = Image20.Picture
Image2.Picture = Image20.Picture
Image3.Picture = Image20.Picture
Image4.Picture = Image20.Picture
Image5.Picture = Image20.Picture
Image6.Picture = Image20.Picture
a = Int(Rnd() * 13 + 1)
b = Int(Rnd() * 13 + 1)
c = Int(Rnd() * 13 + 1)
d = Int(Rnd() * 13 + 1)
e = Int(Rnd() * 13 + 1)
f = Int(Rnd() * 13 + 1)
aa = a
bb = b
cc = c
dd = d
ee = e
ff = f
If a > 9 Then aa = 0
If b > 9 Then bb = 0
If c > 9 Then cc = 0
If d > 9 Then dd = 0
If e > 9 Then ee = 0
If f > 9 Then ff = 0
x = 0
y = 0
TextBox1 = a
g = a
Call cardhai
Image1.Picture = Image21.Picture
TextBox2 = b
g = b
Call cardhai
Image2.Picture = Image21.Picture
TextBox3 = "???"
TextBox4 = "???"
TextBox5 = e
g = e
Call cardhai
Image5.Picture = Image21.Picture
TextBox6 = "???"
flag = 1
kake = TextBox9
End Sub
Private Sub CommandButton3_Click()
If flag = 1 Then
TextBox1 = a
g = a
Call cardhai
Image1.Picture = Image21.Picture
TextBox2 = b
g = b
Call cardhai
Image2.Picture = Image21.Picture
TextBox3 = "NO"
TextBox4 = d
g = d
Call cardhai
Image4.Picture = Image21.Picture
TextBox5 = e
g = e
Call cardhai
Image5.Picture = Image21.Picture
x = aa + bb
y = dd + ee
If x > 9 Then x = x - 10
If y > 9 Then y = y - 10
If y < 6 Then
TextBox6 = f
g = f
Call cardhai
Image6.Picture = Image21.Picture
y = y + ff
If y > 9 Then y = y - 10
End If
If x > y Then
TextBox7 = "¤¢¤Ê¤¿¤Î¾¡¤Á"
kane = kane + kake
End If
If x < y Then
TextBox7 = "¤¢¤Ê¤¿¤ÎÉ餱"
kane = kane - kake
End If
If x = y Then TextBox7 = "°ú¤Ê¬¤±"
TextBox8 = kane
TextBox9 = kake
flag = 0
End If
End Sub
Private Sub CommandButton4_Click()
If flag = 1 Then
TextBox1 = a
g = a
Call cardhai
Image1.Picture = Image21.Picture
TextBox2 = b
g = b
Call cardhai
Image2.Picture = Image21.Picture
TextBox3 = c
g = c
Call cardhai
Image3.Picture = Image21.Picture
TextBox4 = d
g = d
Call cardhai
Image4.Picture = Image21.Picture
TextBox5 = e
g = e
Call cardhai
Image5.Picture = Image21.Picture
x = aa + bb + cc
y = dd + ee
If x > 9 Then x = x - 10
If x > 9 Then x = x - 10
If y > 9 Then y = y - 10
If y < 6 Then
TextBox6 = f
g = f
Call cardhai
Image6.Picture = Image21.Picture
y = y + ff
If y > 9 Then y = y - 10
End If
If x > y Then
TextBox7 = "¤¢¤Ê¤¿¤Î¾¡¤Á"
kane = kane + kake
End If
If x < y Then
TextBox7 = "¤¢¤Ê¤¿¤ÎÉ餱"
kane = kane - kake
End If
If x = y Then TextBox7 = "°ú¤Ê¬¤±"
TextBox8 = kane
TextBox9 = kake
flag = 0
End If
End Sub