This is an old thread but if anyone is still looking for how to refresh queries using VBA in Excel. I used this bit of code to easily do that:
Sub RefreshData()
Dim ws As Excel.Worksheet
For Each q In ActiveWorkbook.Queries
q.Refresh
Next
End Sub