Dim a1 As Data Dim a2 As Data frmSplash.Show a1 = Format(Time, "ss") 4 a2 = Format(Time, "ss") If a2 - a1 <> 3 Then GoTo 4 Me.Show Unload frmSplash 为什么我这样会错啊,提示对象变量或With快变量未设置 我把这段代码放到FORM_LOAD里面 a1 = Format(Time, "ss")这句
Dim a1 As Date Dim a2 As Date frmSplash.Show a1 = Format(Time, "ss") 4: DoEvents a2 = Format(Time, "ss") If a2 - a1 <> 3 Then GoTo 4 Me.Show Unload frmSplash本回答被提问者采纳
第2个回答 2008-07-08
Dim a1 As string Dim a2 As string 数据类型错了。 最好加上DOEVENTS Private Sub Form_Load() Dim a1 As String Dim a2 As String frmSplash.Show a1 = Format(Time, "ss") 4 a2 = Format(Time, "ss") DoEvents If a2 - a1 <> 3 Then GoTo 4 Me.Show Unload frmSplash End Sub
第3个回答 2008-07-08
Dim a1 As Data Dim a2 As Data frmSplash.Show a1 = Format(Time, "ss") 4 a2 = Format(Time, "ss") ''''这一句出错吧? If a2 - a1 <> 3 Then GoTo 4 Me.Show Unload frmSplash