View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default EXCEL 2003 macro issue

What happens when you try the below....Save Changes set to False..

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

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


--
Jacob


"Neil Holden" wrote:

Hi guys, thanks for your help with this.

When i run the macro now it doesnt close excel down, it stays open?

"Jacob Skaria" wrote:

Try the below...True specifies that the workbook to be saved...

ActiveWorkbook.Close True

--
Jacob


"Neil Holden" wrote:

Hi all gurus, help would be appreciated if you can.

I have an excel workbook set on a scheldule and every night at 2 am it will
open, i need all the cells updating and the full excel workbook to close
after 15 seconds.

The code below asks me to save it, i need all this to be done automatically.

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