Compile Error: Can't find project or library

sylvesterbetta

New Member
Joined
Nov 29, 2018
Messages
21
Hi guys, I m new to VBA but have some basic of C programming n JavaScript. I encounter the above error. Below are the coding which I had written. Please assist. Thanks.

Sub Address()


Dim IE As InternetExplorer

'start a new browser instance
Set IE = New InternetExplorer
'make browser visible
IE.Visible = True

'navigate to page with needed data
IE.navigate "https://www.streetdirectory.com"
'wait for page to load
Do While IE.Busy = True Or IE.readyState <> 4: DoEvents: Loop




End Sub
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hello,

In your Menu ... you need to add a reference ...

Tools>References>Microsoft Internet Controls

Hope this will help
 
Upvote 0
You need to add references in the object library

The two you need are:

Microsoft HTML Object Library
Microsoft internet controls.

You add them by going into the VBA editor to the menu.

Click Tools > References

When the references window pops up, check those two libraries.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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