Need to edge out the competition for your dream job? Train for certifications today.
'All code goes in ThisWorkbook code pane
Private Sub Workbook_Open()
Private Sub UpdateAtMidnight()
Dim ws As Worksheet
ThisWorkbook.Worksheets(1).Calculate 'First worksheet in workbook
'Sheet1.Calculate 'Using code name (not necessarily the same as what you see on the sheet tab)
'Worksheets("Sheet1").Calculate 'Using the tab name (what you do see on the sheet tab)
Application.OnTime Date + 1, "ThisWorkbook.UpdateAtMidnight"
Open in new window
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime Date + 1, "UpdateAtMidnight", , False
This course teaches how to install and configure Windows Server 2012 R2. It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Be seen. Boost your question’s priority for more expert views and faster solutions