-
Oct 4th, 2007, 12:34 PM
#1
Thread Starter
New Member
Manipulate Data On Web Pages
none of this code is really working for me. I'm using VB through MS Access. I can bring up a webpage using this:
Code:
Public Sub Command0_Click()
Dim webBrowser1 As WebBrowser
Set webBrowser1 = New WebBrowser
Set webBrowser1 = CreateObject("InternetExplorer.Application")
webBrowser1.Navigate "http://www.mywebpage.com"
webBrowser1.Visible = True
End Sub
but i have no clue how to manipulate the data on the webpages. I want to be able to fill in forms and click buttons. I've tried using some of the codes from this thread but keep getting error messages. Can anyone help?
-
Oct 4th, 2007, 12:41 PM
#2
Re: Manipulate Data On Web Pages
Split from this thread in the CodeBank
Welcome to the forums
I have split your post as you folks only go into the CodeBank to look for code tips not necessarily to answer questions for other members.
You will have much better luck with your question here.
-
Oct 4th, 2007, 12:54 PM
#3
Hyperactive Member
Re: Manipulate Data On Web Pages
This sort of thing is a large part of what i'm doing for my job right now. Now, you do need to know if the page you're accessing is javascript based or not. If it's not, then here's some example lines of code.
automated login
Code:
username = "Whatever"
password = "Something else"
dim ie as object
set ie = CreateObject("InternetExplorer.Application")
with ie
.visible = true
.navigate "www.mypage.com"
do while ie.busy: doevents: loop
do while ie.readystate <>4 :Doevents:loop
'put this code after each navigation to make sure the page is fully loaded before continuing
.document.all.item("name of login name text box").value = username
.document.all.item("name of password text box").value = password
.document.all.item("name of login button").click
do while ie.busy: doevents: loop
do while ie.readystate <>4 :Doevents:loop
Basically you just look for the name="Whatever" tags in the html for the fields you want to input to and then put them in the Item("") section of the above code.
-Show me on the doll where the music touched you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|