I need my workbook to refresh data whenever a new tab for a worksheet is selected. I looked around on several sites and couldn't find the syntax for this. I have a function below for refreshing the data and I was planning on calling that function that if a tab was changed in the "ThisWorkbook" object in the VBA editor. Any advise? Thanks
Code:
Sub RefreshAllData()
ActiveWorkbook.RefreshAll
End Sub