The below macro executes the refreshing correctly but takes a while because there are 40 sheets that contain "Rpt_*" and it loops 20 times.
Is there a way to refresh all these sheets at once ?
thanks in advance!
Is there a way to refresh all these sheets at once ?
thanks in advance!
VBA Code:
Sub rpt_sheets_recalc()
If Range("rpt_refresh").Value = 1 Then
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.name Like "Rpt_*" Then
ws.Calculate
Application.StatusBar = "Refreshing " & ws.name & "..."
Debug.Print ws.name
End If
Next ws
Application.StatusBar = False
Else
End If
End Sub