right-click the Excel LOGO near the file menu, select View Code, paste this in:
Private Sub Workbook_Open()
If GetSetting("open", "open", "Count", 0) * 1 = 30 Then
Msgbox "Expired!"
ThisWorkbook.Close False
End If
SaveSetting "open", "open", "Count", GetSetting("open", "open", "Count", 0) * 1 + 1
End Sub
I understand what this code is doing and how it works but I got it to work once and then I entered it again using the number 3 rather than 30 to test it and now it doesn’t run. Hum maybe something I did. But thanks so much for your time on this.
I can just click “No” to the “Allow Macros” dialog box when opening your workbook. That would stop the macro from running.