VBA: WebQuery assigned as an Array - Password Protected Site!

actjfc

Active Member
Joined
Jun 28, 2003
Messages
416
Excel friends,

I found this code, it gets the nx3 matrix stored in table done with HTML code in passwords.html, and copy all values to the active sheet starting in A1, and works fine so far:

Public Sub GetValues2()
Let TheURL = "http://www.samplewebsite.com/PW/passwords.html"
With ActiveSheet.QueryTables.Add(Connection:="URL;" & TheURL, Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub

But, I have two challenges:

1) I need the nx3 matrix assigned to an array, not copied to the active sheet. The three columns to read are UserID, Password, and Date. And,
2) How can I access the same matrix if the folder PW is password protected.

I think it should be "easy" to do for the gurus at the forum, they have the know how.

Any help to develop the VBA is highly appreciated! Thanks!
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

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