I am trying to get a macro to run and grab some weather data from a website. I need it to look ahead in time several hours. Here is what I have been trying but no luck in getting this to work. In the URL it calls out AheadHour= and that is where I am trying to insert the cell with the time I need it to look ahead.
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://forecast.weather.gov/MapClick.php?w0=t&w3u=1&w6=rh&w10u=0&w13u=1&w14u=1&AheadHour=" & Sheets("TEMPS").Range("FirstTime").Value & "Submit=Submit&FcstType=digital&textField1=33.43742&textField2=-112.85199&site=all&unit=0&dd=&bw=" _
, Destination:=Range("$A$4"))
.Name = _
"MapClick.php?w0=t&w3u=1&w6=rh&w10u=0&w13u=1&w14u=1&AheadHour=9&Submit=Submit&FcstType=digital&textField1=33.43742&textField2=-112.85199&site=all&unit=0&dd=&bw="
.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 = "8"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://forecast.weather.gov/MapClick.php?w0=t&w3u=1&w6=rh&w10u=0&w13u=1&w14u=1&AheadHour=" & Sheets("TEMPS").Range("FirstTime").Value & "Submit=Submit&FcstType=digital&textField1=33.43742&textField2=-112.85199&site=all&unit=0&dd=&bw=" _
, Destination:=Range("$A$4"))
.Name = _
"MapClick.php?w0=t&w3u=1&w6=rh&w10u=0&w13u=1&w14u=1&AheadHour=9&Submit=Submit&FcstType=digital&textField1=33.43742&textField2=-112.85199&site=all&unit=0&dd=&bw="
.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 = "8"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False