ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Execution Stopped (https://www.excelbanter.com/excel-programming/300215-re-macro-execution-stopped.html)

Tom Ogilvy

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




Phil Hageman[_3_]

Macro Execution Stopped
 
Hi Tom

Thanks for your reply. The macro is in personal.xls, not the workbook being closed

Phil


All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com