Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

Application.OnTime isn't running automatically

$
0
0

I'm trying to close my workbook after a certain amount of time.

I'm using 10 seconds for now just to test it but it's not working automatically.

I have to run the code once by myself.

here's my code in module.

Public Sub fermeoutil()

Workbooks("OUTIL_CRN.xlsm").Save
Workbooks("OUTIL_CRN.xlsm").Close
Call test
End Sub

Sub test()
Application.OnTime Now + TimeValue("00:00:10"), "fermeoutil"

End Sub



Viewing all articles
Browse latest Browse all 88835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>