Run time error message

Sharid

Well-known Member
Joined
Apr 22, 2007
Messages
1,064
Office Version
  1. 2016
Platform
  1. Windows
This code was work fine, for the large part. meaning it did not fully do what i wanted but no errors popped up.
Now I get a Method 'Busy' of object 'IWebBrowser2' Failed error message

Not sure what has gone wrong, it was error free 20min ago :confused:

Private Sub CommandButton1_Click()
' +++++++++++++++ FOR url extraction ++++++++++++++++

Dim ie, items, elem As Object
Dim i, j, k, l As Integer

i = 2
k = 2
l = 2

Set ie = CreateObject("InternetExplorer.Application")

ie.Navigate Sheets("Sheet2").Range("A1").Value
ie.Visible = True
Application.Wait (Now + TimeValue("00:00:10"))

Do While ie.busy Or ie.readyState <> 4

Loop

For i = 0 To 500
On Error Resume Next

Sheets("Sheet1").Range("A" & i).Value = ie.document.getelementsbytagname("a").Item(i).innerText

Next i
ie.Visible = Quit


' Deletes duplicates in column A
Columns(1).RemoveDuplicates Columns:=Array(1)

End Sub

For more info on what the code does see my original thread https://www.mrexcel.com/forum/excel-questions/1040144-url-search.html
 
Last edited:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
This is sorted now, just need the the PC rebooting, still stuck on the code not fully doing what it needs to. could someone have a look at my link in the first post as it explains the problem.
 
Upvote 0

Forum statistics

Threads
1,214,904
Messages
6,122,169
Members
449,070
Latest member
webster33

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