Excel and IE10 and (drum-roll please....) Javascript!

pleeseemailme

Board Regular
Joined
Dec 26, 2013
Messages
201
Howdy All,

I have 2 questions regarding using VBA to manipulate Internet Explorer. I'm new to the IE object library so my first question is: does anyone know of a good reference I could read, or purchase, to learn better what I am doing? I've been able to trudge through pretty well myself so far, but yesterday I hit a snag. I have more of this I'm going to be doing and I'd like to not have to bother this forum with every question. I think it has something to do with my understanding of the pages HTML code, which I haven't looked at HTML code since college in 2003. So, maybe a good HTML reference would be good as well.

But, in the mean time here is what I'm up against. This is the source code:
PHP:
<DD><li type=disc><A HREF="javascript:runE1UBEVersion('R48496','MFC0001','0')"> Work Order Summary Report</A></li><li type=disc><A HREF="javascript:runE1UBEVersion('R48497','MFC0001','0')"> Work Order Cost Summary Report</A></li><li type=disc><A HREF="javascript:runE1UBEVersion('R5509030','MAREK001','0')"> Billing Worksheet</A></li><li type=disc><A HREF="javascript:runE1UBEVersion('R5551003','MBS0001','0')"> Work in Progress Report</A></li></DD>


And here is my VBA Code:
Code:
Dim appIE As Object 
Dim UserN As Object 
Dim PW As Object 
Dim Element As Object 
Dim btnInput As Object 
Dim ElementCol As Object
Dim Link As Object 

' my code that logs in to the site

Call appIE.Document.parentWindow.execScript("runE1UBEVersion('R5551003','MBS0001','0');")
'this is the last line of code above, the 'Work in Progress Report'

Every time I get to this last line I get an run-time error. Operation could not complete due to error 80020101. From what I've read online this just means there is an error running the Javascript, but that all it tells you - it doesn't give any specifics on the type of error it could be.

I've tried about every combination of .execScript I can think of. I've even looped through all the frames on the page - replacing .parentWindow with .Frames(x) - where x is each frame index number. I'm not sure what else is left to try. Please let me know what you think - thanks so much.
 
Last edited:

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Howdy All,

It's been a while and I'm starting to get back into this project. I was wondering if this time around anybody had any light to shed on the question above. Please let me know.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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