excel 2003 + macro help

N

Neil Holden

Please tell me what i'm doing wrong, i want the entire excel document to
close??

Call Application.OnTime(Now + TimeValue("00:00:15"),
"ThisWorkbook.Auto_Close")

Thanks.
 
D

Dave Peterson

You have the solution at your other post.

Neil said:
Please tell me what i'm doing wrong, i want the entire excel document to
close??

Call Application.OnTime(Now + TimeValue("00:00:15"),
"ThisWorkbook.Auto_Close")

Thanks.
 
G

Gary Brown

Don't know what the Auto_Close is about but this works...

Public Sub Test_Me()
On Error Resume Next
Application.OnTime Now + TimeValue("00:00:15"), "CloseMe"
End Sub

Public Sub CloseMe()
Application.ActiveWorkbook.Close
End Sub

where the CloseMe( ) procedure is in a standard module
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Outlook Application.OnTime not working in Outlook VBA 1
Run a Macro at a certain time 2
EXCEL 2003 macro issue 8
Application.OnTime 2
If statements in macros 10
On time kill 4
Automatic increment of onTime 4
Can't Stop the clock 2

Top