stuartmacdonald
New Member
- Joined
- May 26, 2009
- Messages
- 48
I'm looking to give users an option when closing a workbook and have put in the following VBA code, but I cant figure out how to trigger the opening of another workbook if 'yes' is selected.
I need to add in an, if yes
Workbooks.Open "C:\Users\Stuart MacDonald\OneDrive - Cles\Order book\Refresh.xlsm"
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean) If MsgBox("Do you need to refresh timesheets?", _
vbQuestion + vbYesNo) = vbNo Then
Cancel = True
End If
End Sub
I need to add in an, if yes
Workbooks.Open "C:\Users\Stuart MacDonald\OneDrive - Cles\Order book\Refresh.xlsm"