Parameters in web query

ONIWE

New Member
Joined
Jun 29, 2010
Messages
27
Guys help,

I have a written a vba code that queries the web and would like the code to change the parameters for me without having to key in the numbers.

Could someone please send me a short code to include in the parameter section.

The parameters should be where the "=[]" is as I would like multiple numbers in there.


Please see my code below:

Sub SCORE()
'
' SCORE Macro
'
' Keyboard Shortcut: Ctrl+Shift+S
Dim ws As Worksheet
Application.ScreenUpdating = False
'add new sheet for new download'
Set ws = Sheets.Add(After:=Worksheets("report"), Count:=1)
ws.Name = "Creditsafe"
'download data from Creditsafe'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;Your session has timed out - Creditsafe UK[]" _
, Destination:=Range("$A$1"))
.Name = "CompanySummary.aspx?CompanyNumber=04512563"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1,2,3"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


End Sub
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,214,879
Messages
6,122,065
Members
449,064
Latest member
scottdog129

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