amazeballs
New Member
- Joined
- Apr 24, 2020
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hi,
I have a macro setup that captures all of the sheet names in a workbook, and puts it on a Contents page (sheet 1).
It's working great however it doesn't automatically refresh when a user changes sheet names. I have to ask users to manually press Ctrl+ Alt + F9 each time they open the workbook.
I'm looking to add a "Refresh" button on the first sheet which refreshes all the data for them.
I've inserted the button and entered the below code however it's not refreshing the data. Can anyone assist?
Thank you
Private Sub CommandButton1_Click()
ActiveWorkbook.RefreshAll
MsgBox "Sheet Names have been refreshed!"
End Sub
I have a macro setup that captures all of the sheet names in a workbook, and puts it on a Contents page (sheet 1).
It's working great however it doesn't automatically refresh when a user changes sheet names. I have to ask users to manually press Ctrl+ Alt + F9 each time they open the workbook.
I'm looking to add a "Refresh" button on the first sheet which refreshes all the data for them.
I've inserted the button and entered the below code however it's not refreshing the data. Can anyone assist?
Thank you
Private Sub CommandButton1_Click()
ActiveWorkbook.RefreshAll
MsgBox "Sheet Names have been refreshed!"
End Sub