Need Help about Webbrowser
Hello Guys,
I cant make it work, i want when the set text is received by webbrowser which is from label1, then it PoPUP message, "SET TEXT IS FOUND". But it is not happening. Please help.
Code:
Private Sub Form_Load()
WebBrowser1.Navigate ("http://free.timeanddate.com/clock/i1wtsrdx/n2/fn5/fs28/tcddd/ftb/bas5/bat6/baceee/pa2")
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
Dim ans As String
ans = InputBox("TIME??", "", "6:04:22 AM")
If ans = "" Then
Label1.Caption = "No message"
Else
Label1.Caption = ans
End If
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
If WebBrowser1.Document.body.innerText = Label1.Caption Then
MsgBox "SET TEXT IS FOUND"
End If
End Sub
Re: Need Help about Webbrowser
i don't believe the webbrowser status is changed when the time updates, better to put the code in your timer
Re: Need Help about Webbrowser
Guys, please anyone help. Cannot open the .exe file i made.
vb Code:
Private Sub Form_Load()
WebBrowser1.Navigate ("http://free.timeanddate.com/clock/i1wtsrdx/n2/fn5/fs28/tcddd/ftb/bas5/bat6/baceee/pa2")
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
Dim ans As String
ans = InputBox("TIME??", "", "12:11:22 PM")
If ans = "" Then
Label1.Caption = "No message"
Else
Label1.Caption = ans
End If
End Sub
Private Sub Timer1_Timer()
Timer1.Enabled = True
If WebBrowser1.Document.body.innerText = Label1.Caption Then
Dim Retval
Retval = Shell("C:\WINDOWS\System32\MASTER.exe", 1) 'Run Master'
End If
End Sub
It gives error :
Run-time error '91': Object variable or with block variable not set
Please help Guys.