I have the macro below but am hitting a snag when I try to run the macro the next day. I get a debug error for .Refresh BackgroundQuery:=False. I have tried to look up if I need to change this expression to True but I still get debugging errors (I don't quite understand what the expression means either). Any suggestions on what may be happening? I have read in these forums to avoid the Select command and to make the code fully qualified. But I don't know how to do that. Thank you for reading my post and hopefully someone can shed some light on this. (The macro is actually larger than this, it basically does the same thing 4 times but to different Snotel Sites, ie June Lake)


Sub EraseCurrentYear()
Sheets("June Lake").Select
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.wcc.nrcs.usda.gov/reportGenerator/view_csv/customSingleStationReport/daily/553:WA:SNTL%7Cid=%22%22%7Cname/CurrentCY,CurrentCYEnd/WTEQ::value" _
, Destination:=Range("$A$1"))
.Name = "value_6"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Sheets("June Lake").Select
Rows("1:7").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True