我知道你的意思:是不是每組數字來回滾動,隨即組合。
停止時,組合成一組數字,並以這組數字作為中獎號碼。
建立一個按鈕:command1
private
sub
command1_click()
dim
a
as
integer
dim
b
as
integer
dim
c
as
integer
'a
b
c
為隨機變數
dim
abc
as
string
'abc為組合號碼
a
=
int(rnd
*
9)
+
1
b
=
int(rnd
*
9)
+
1
c
=
int(rnd
*
9)
+
1
abc=a
&
b
&
c
'組合中獎號碼
'假設3到10等獎為003,004......,010
if
a
=
001
then
msgbox
"你中了1等獎!",
vbokonly,
"系統提示"
end
if
if
a
=
002
then
msgbox
"你中了2等獎!",
vbokonly,
"系統提示"
end
if
......
......
if
a
=
010
then
msgbox
"你中了10等獎!",
vbokonly,
"系統提示"
end
if
end
sub
ok...