hi .
i have these codes :

Private Sub Form_Load()
 WebBrowser1.Navigate "http://www.film-ha.com/wp-login.php"

 Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
    DoEvents
Loop
If URL = "http://www.film-ha.com/wp-admin/" Then

WebBrowser1.Navigate "http://film-ha.com/wp-admin/post-new.php"

End If
End Sub

can anyone help me about how to add if webbrowser url is exact url that i want ?
or maybe help about search text in content of that url and do msgbox ?

thanks

Not really sure what you are trying to do, can you try to explain it again please? :)

From what I can see, you want to see if the person logged into the form load website, and if they logged in, they get sent to the post new page with no clicks, right?

i want program to write new post !
if login in site go to new post page !

Hey buddy, okay I made this quickly to help you out, I added webbrowser1 and a Timer with an interval of 1, and enabled. If you change the websites I used into the ones you need, it should work :) Try it out

Private Sub Form_Load()
Timer1.enabled = True
Timer1.interval = 1
WebBrowser1.Navigate "https://www.pizzahut.co.uk/"
End Sub

Private Sub Timer1_Timer()
'If this is the successful login page, then it shows a Msgbox and navigates to next page you need.
If WebBrowser1.LocationURL = "https://www.pizzahut.co.uk/menu/pizza" Then
MsgBox "Welcome, navigating to new post screen", vbOKOnly
'The webpage you want them to be on :)
WebBrowser1.Navigate "http://www.google.com"
End If
End Sub

This article has been dead for over six months. Start a new discussion instead.