Copy and pasting information from web

welchy82

New Member
Joined
Dec 20, 2014
Messages
1
hi i am new to this site and not great at coding most of the bits i know how to do i have stolen, but now i am stuck.

i need to copy and paste information form about 1200 different web address. i have worked out how to do the copy and pasting in to the spreadsheet, but when i add it to the spread sheet it shifting right what i would like it to do is shift down instead or paste it to below when its pasted into the spread sheet

this is the coding i am using at the moment.

Code:
Sub Web()
Dim objWeb As QueryTable


Set objWeb = ActiveSheet.QueryTables.Add( _
Connection:="URL;http://www.nsncenter.co.uk/NSN/5305-00-208-1429", _
Destination:=Range("A1"))


 With objWeb
.WebSelectionType = xlSpecifiedTables
 .WebTables = "2" ' Identify your HTML Table here
.Refresh BackgroundQuery:=False
.SaveData = True
End With
Set objWeb = ActiveSheet.QueryTables.Add( _
Connection:="URL;http://www.nsncenter.co.uk/NSN/5310-00-208-9255", _
Destination:=Range("A1"))


 With objWeb
.WebSelectionType = xlSpecifiedTables
 .WebTables = "2" ' Identify your HTML Table here
.Refresh BackgroundQuery:=False
.SaveData = True
End With
Set objWeb = ActiveSheet.QueryTables.Add( _
Connection:="URL;http://www.nsncenter.co.uk/NSN/5935-00-221-8620", _
Destination:=Range("A1"))


 With objWeb
.WebSelectionType = xlSpecifiedTables
 .WebTables = "2" ' Identify your HTML Table here
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub
 
Last edited:

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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