Automatically close Workbook after inactivity

前端 未结 2 1763
臣服心动
臣服心动 2021-01-11 19:34

I created a Macro that closes the WB after some time of inactivity. It works perfect if I manually open the file, but if I use another macro from a different WB to open the

2条回答
  •  感情败类
    2021-01-11 19:54

    try adding a stop statement to your workbook_open to test if the event is even being triggered

    Private Sub Workbook_Open()
      start_Countdown
      Stop
    End Sub
    

    this would be a brute force way the to run the open Event from the Calling Workbook.

    Application.Run(ActiveWorkbook.name & "!Workbook_Open")

    add this just after you open the Workbook.

提交回复
热议问题