读书人

vb6.0设计的浏览器出现异常:实时异常

发布时间: 2012-01-07 21:41:55 作者: rapoo

vb6.0设计的浏览器出现错误:实时错误‘91’:对象变量或with块变量未设置
出现错误的代码如下:
Private Sub Text1_KeyDown(KeyCode As MSForms.ReturnInteger, Shift As Integer)
If Text1.Text = "请输入网址 " Then
Text1.Text = ""
End If

If KeyCode = 13 Then
If Left(Text1.Text, 7) <> "http://" Then
Text1.Text = "http://" + Text1.Text '如果输入网址不是以“http://”开头则自动添加
End If
frmMain.ActiveWeb.Navigate Text1.Text [color=#FF0000][/color]这是错误提示的地方
frmWebBrowser.Show
frmSplash.Hide
WindowsMediaPlayer1.Close
End If
End Sub


[解决办法]
frmWebBrowser.ActiveWeb.Navigate Text1.Text [color=#FF0000][/color]这是错误提示的地方
frmWebBrowser.Show

读书人网 >VB

热点推荐