首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

vb6.0设计的浏览器出现异常:实时异常‘91’:对象变量或with块变量未设置

2012-01-07 
vb6.0设计的浏览器出现错误:实时错误‘91’:对象变量或with块变量未设置出现错误的代码如下:Private Sub Tex

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

热点排行