View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default 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