Dim i As Integer Private Sub cmdOk_Click() webB1.Navigate txtAddress.Text Timer1.Interval = Int(txtitv.Text) Timer1.Enabled = True Me.Visible = False i = 0 End SubPrivate Sub Command1_Click() Timer1.Enabled = False End SubPrivate Sub Form_Load() i = 0 End SubPrivate Sub Timer1_Timer() If i >= Int(txtCount.Text) Then Timer1.Enabled = False Me.Visible = True If s = MsgBox("i had clicked the address:" & txtAddress.Text & "/clf" & "times:" & Str(i)) = vbOK Then End End If ElseIf Not IsNull(webB1.LocationURL) And Not webB1.Busy Then webB1.Refresh i = i + 1 End If End IfEnd Sub用webbrowser简单自动点击的程序。
To monday48427(日月无光): 本来就没有功能的
介面漂亮,还用到了API函数,这是你的第一个程序么? 偶的第一个VB程序实在是惨不忍睹。:(
楼主: 请教一个问题,我刚学VB,打算做一个通讯录;但是我启动后,提示我 实时错误'91': 对象变量或 with 块变量未设置 代码如下:Private Sub Command1_Click() Data1.UpdateRecord End SubPrivate Sub Command2_Click() Unload Me End SubPrivate Sub Command3_Click() Data1.Recordset.AddNew End SubPrivate Sub Command4_Click() Data1.Recordset.Delete End Sub能帮帮我吗?很迷惑!谢谢!
你!~ 居然用VB泡mm啊。~~
faint,这不太好吧,当然,用自己的所学讨mm欢心也可以。
To: kissseething(MM)很不好意思 我也是刚学VB 你的问题偶没办法解决 不过你可以到[基础类]区去问问 偶的很多问题都是在那里解决的
to kissseething(MM) : 有些对象你必须这样定义: Dim obj as New Object 如果你像下面这样定义 Dim obj as object 那么,就会出现 ========================= 实时错误'91': 对象变量或 with 块变量未设置 ================================= 所以你改成: Dim obj as new object 或用 Set obj= Object
Private Sub cmdOk_Click()
webB1.Navigate txtAddress.Text
Timer1.Interval = Int(txtitv.Text)
Timer1.Enabled = True
Me.Visible = False
i = 0
End SubPrivate Sub Command1_Click()
Timer1.Enabled = False
End SubPrivate Sub Form_Load()
i = 0
End SubPrivate Sub Timer1_Timer()
If i >= Int(txtCount.Text) Then
Timer1.Enabled = False
Me.Visible = True
If s = MsgBox("i had clicked the address:" & txtAddress.Text & "/clf" & "times:" & Str(i)) = vbOK Then
End
End If
ElseIf Not IsNull(webB1.LocationURL) And Not webB1.Busy Then
webB1.Refresh
i = i + 1
End If
End IfEnd Sub用webbrowser简单自动点击的程序。
本来就没有功能的
介面漂亮,还用到了API函数,这是你的第一个程序么?
偶的第一个VB程序实在是惨不忍睹。:(
楼主: 请教一个问题,我刚学VB,打算做一个通讯录;但是我启动后,提示我 实时错误'91': 对象变量或 with 块变量未设置 代码如下:Private Sub Command1_Click()
Data1.UpdateRecord
End SubPrivate Sub Command2_Click()
Unload Me
End SubPrivate Sub Command3_Click()
Data1.Recordset.AddNew
End SubPrivate Sub Command4_Click()
Data1.Recordset.Delete
End Sub能帮帮我吗?很迷惑!谢谢!
我也是刚学VB
你的问题偶没办法解决
不过你可以到[基础类]区去问问
偶的很多问题都是在那里解决的
有些对象你必须这样定义:
Dim obj as New Object
如果你像下面这样定义
Dim obj as object
那么,就会出现
=========================
实时错误'91': 对象变量或 with 块变量未设置
=================================
所以你改成:
Dim obj as new object
或用
Set obj= Object