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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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