PDA

View Full Version : Web Query refresh issue



froggyface88
01-03-2014, 05:24 AM
I've set up a web query that I would like to refresh as the beginning of my macro. If I run the macro in debugging mode, everything works as planned. However, if I just run the macro, I get an error later in my code (that part of code not included here). I believe that the data isn't refreshing from the web query if the macro runs on its own. Help?




Set qtQtrResults = _
Worksheets(1).QueryTables(1)
With qtQtrResults
If .QueryType = xlWebQuery Then
.Refresh
End If
End With

Cells.Select
With Selection.Font
.Size = 9
End With

If Cells(1, 1).Value = "" Then
Rows(1).Delete
End If
.
.
.