Code: Select all
Private Sub Workbook_Open()
'any code in here
End Sub
Code: Select all
Private Sub Workbook_Open()
'any code in here
End Sub
Nice one SB, had no idea there was a 'before close' event. Cheers!spreadbetting wrote: ↑Wed Nov 20, 2019 2:01 pmNo problem, glad it works for you. There's also a similar Workbook_Open code you can use that fires off code once a worksheet has been opened. I use it to set up certain variables and ensure any trigger cells are clear when a workbook opens. Might be of use somewhere down the line to you. Again it just goes in the ThisWorkbook module.
Code: Select all
Private Sub Workbook_Open() 'any code in here End Sub