Hi All
Need assistance with a macro I have created.
I am trying to insert data from a web source based on a start date and an end date of my choice.
To fully automate this I want the VB to pick up the dates from 2 cells and use them to get the data from a web page.
For work security I have replaced the web address with ??.
Whenever I run the macro is comes up with a bug on the line below that I noted in red.
HELP PLS!!!
Sub Macro1()
'
' Macro1 Macro
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://info.??.??.??/performanceEMR/performanceEMR.aspx?StartDate=" & Sheet12.Range("T14") & "%0000:00:00&EndDate=" & Sheet12.Range("T15") & "%2023:59:59&Grouping=CallTaker&Columns=TC&EDC=Lewes&MINAP=Yes" _
, Destination:=Range("$H$1"))
.Name = "59&Grouping=CallTaker&Columns=TC&EDC=Lewes&MINAP=Yes"
.FieldNames = False
.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 = """tblPerformance"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Bookmarks