79437716

Date: 2025-02-13 21:11:05
Score: 1
Natty:
Report link

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
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Luis Heredia