- Apr 3, 2013
I found this code on a spreadsheet at work (a board displayed on a big screen which is on 24/7). Can't get an answer from the owner regarding what exactly it does. It suposedly saves the workbook (amongst other actions) by calling the "UpdateData" Sub at a determined time. I find the first Sub pretty straightforward, but the second one really confuses me .
'Macro that runs after board is initially opened. Sub SaveBoard() BoardData = TimeValue("21:50:00") Application.OnTime BoardData, "UpdateData" End Sub 'Macro that runs each day after the file is opened. Sub SaveBoardDaily() BoardData = Now + TimeValue("23:59:59") Application.OnTime BoardData, "UpdateData" End Sub