VB:自动关闭form时,为何UNLOAD提示没有声明

来源:百度知道 编辑:UC知道 时间:2024/05/07 20:42:32
form1中button弹出form2,form2 3秒后自动关闭, Timer1.Enabled = False unload(form2) ,括号取消不了啊

unload(form2)应该是unload form2
还要保证Timer1是画在form1中的。
你把运行的程序停止了,就能去掉了。

在form2中写unload me
完整的:
form1中:
private sub command1_click()
form2.show
end sub
form2中:
timer1.inteval=1000 '属性
private sub timer1_timer()

dim n %
n=n+1
if n=3 then unload me
end sub