Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with closing workbook in macro
Hi,
In a macro written in Excel2000, I close a workbook using method workbook.close(false) and this working well. Now we are using Excel 2003 and workbook doesn't close. Popup "Do you want to save..." appears and even if you click yes, no or cancel, workbook doesn't close and macro follows running without problem. Any idea? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with closing workbook in macro
I've never seen a difference in the way xl2k and xl2003 will handle this.
But maybe you have a workbook_beforeclose event firing in that other workbook. (And I wouldn't use a variable named Workbook. It confuses me, even if xl lets you do it.) application.enableevents = false mywkbk.close savechanges:=false application.enableevents = true === Is it the same workbook that was used in xl2k that you're using in xl2003? If it is (and you haven't made any changes), then I don't think that this is the answer. slm wrote: Hi, In a macro written in Excel2000, I close a workbook using method workbook.close(false) and this working well. Now we are using Excel 2003 and workbook doesn't close. Popup "Do you want to save..." appears and even if you click yes, no or cancel, workbook doesn't close and macro follows running without problem. Any idea? Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Set macro to run automatically when closing workbook? | Excel Discussion (Misc queries) | |||
Closing Excel with Personal Macro Workbook | Excel Discussion (Misc queries) | |||
CLosing Excel 2007 with personal macro workbook | Excel Discussion (Misc queries) | |||
Problem closing a workbook using a macro | Excel Programming | |||
closing excel after closing a workbook | Excel Programming |