Automating with Internet Explorer

sarahlish18

Board Regular
Joined
Feb 6, 2007
Messages
60
Hello,

I am trying to use Excel VBA to conduct a transaction automatically.So far,I managed to get all the required input in.Now,I need to click the "Submit" Button.

I was thinking of using the InternetExlorer.Document.Links(x).Title to search for the link of the "Submit" button and then use the .Navigate method to proceed to the link.

But when I wrote and ran the :

InternetExlorer.Document.Links(x).Title

i get the following mesage:

"Run Time Error 98

A property or method cannot include a reference to a private object ,either as an argument or as a return value "

Please help me figure out how to get around this error.Is there a method that I can use to retrieve the name of the link?I am not familiar with automating the elements of IE...
Thank you.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi Andrew,

I tried bit it doesn't work.I get this error with submit highlighted:

Object variable or With Block variable not set.

Also I tried looking for 'Submit' under the forms.item1 hierarchy in the AddWatch window and couldn't find it.

thanks for your suggestion.
 
Upvote 0
Sarah

It's hard to help with this sort of thing without seeing some actual code and/or the URL you are trying to work with.

I would also wonder if this new InternetExlorer is a new version of the much maligned InternetExplorer.:)
 
Upvote 0
Sorry Norie,

It's not feasible for me to post the URL because it is a private website and also because it requires you to login.

The layout if the page is similar to a page where you are required to log-in,ie There's a textbox for username and password and a button called submit.

I manage to get the input unto the textbox by appending to the URL the details eg http//:www.websitename.com/usersame=A&password=B.

that link brings you to a page where you are required to confirm what you just entered by clicking on the 'submit' button.I tried to get the link of the submit button but in won't show on IE's status bar.

the reference that I use is the one that belongs to SHDocVw;
C:\WINDOWS\system32\ieframe.dll
Microsoft Internet Controls

Is this the 'maligned version' you are talking about.I am willing to use other browser eg Firefox if I can get my hands on sufficient documentation.

Thanks.
 
Upvote 0
In the past I've found IMacros extremely useful for identifying the names of controls for which the underlying code is unavailable.
 
Upvote 0
Hello,

Andrew,the code still dosen't work.My post my contained a typo but my code certainly did not :) . I still couldn't find the member '.Submit' in the Add Watch hierarchy.

ScottR,I find IMacros very helpful.Thanks for introducing it to me.Unfortunately,I could'nt understand the code.(I'm only familiar with C++ and VB)

I was thinking of having excel modify the .iim file as and when necessary and then have IE execute the macro.

I think I am able to modify the file,but I can't figure out how to have IE execute it.Any suggestions?

Thank You Very Much!
 
Upvote 0

Forum statistics

Threads
1,214,999
Messages
6,122,645
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top