View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Macro Execution Stopped

Is the code in the activeworkbook - the one being closed?

--
Regards,
Tom Ogilvy

"Phil Hageman" wrote in message
...
Get a "Code execution has been interrupted" message when running this

macro. Selecting Debug, the line ActiveWorkbook.Close is highlighted yellow.
Could someone tell me what stops execution?

Sub SaveAndClose()
'Saves and closes a Workbook
Range("A1").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub