Interacting with Internet Explorer Problem

J

jeff.kimble

Hi, everyone. I have a macro in Excel that takes user inputs in Excel
and copies them into a form on a web page. I am having trouble
"clicking" on a button on the web page. I tried the following code to
find the button on the page:

For Each l In ie.Document.Links
Debug.Print l.Address
Next l

This code only finds the buttons at the top of the page and the bottom
of the page (i.e, it can't find buttons in the middle section/form).

The html shows the button I am interested in as:

"...onclick="submitForm('DefaultFormName',1,
{'_FORM_SUBMIT_BUTTON':'addrow'});return false">..."

This button adds a row to the form on the web page.

Does anyone have ideas on how I can click this button view VBA in
Excel?

Thanks in advance!
jk
 
J

jeff.kimble

Hi, everyone. I have a macro in Excel that takes user inputs in Excel
and copies them into a form on a web page. I am having trouble
"clicking" on a button on the web page. I tried the following code to
find the button on the page:

For Each l In ie.Document.Links
Debug.Print l.Address
Next l

This code only finds the buttons at the top of the page and the bottom
of the page (i.e, it can't find buttons in the middle section/form).

The html shows the button I am interested in as:

"...onclick="submitForm('DefaultFormName',1,
{'_FORM_SUBMIT_BUTTON':'addrow'});return false">..."

This button adds a row to the form on the web page.

Does anyone have ideas on how I can click this button view VBA in
Excel?

Thanks in advance!
jk

I wanted to clarify the code above... The for loop is actually

For Each l In ie.Document.Links
Debug.Print l.innerText
Next l

Thanks,
jk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top