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:
And here is my VBA Code:
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.
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: