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
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