Private Sub Workbook_Open()
If Weekday(Now, vbMonday) < 6 Then
Application.OnTime VBA.TimeValue("23:59:00"), "knappen"
End If
End Sub
shall be in thisworkbook code. In VBA Editor (Alt+F11) click on the list of your workbook objects on ThisWorkbook (could be also translated - in PL versions since Excel 2007 it's called Then_Skoroszyt - which means thisworkbook anyway :-P) to open it's code
PS. To attach a sample workbook click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window. Select files (max 2) press Upload and press Close then Submit reply
Bookmarks