zest1
10-15-2006, 10:12 AM
I'm trying to close a wb without saving, but the following codes will just not work. :confused4
Sub CloseWB()
Application.DisplayAlerts = False
ThisWorkbook.Close
Application.DisplayAlerts = True
End Sub
this doens; work either:
ThisWorkbook.Close SaveChanges:=False
I even tried adding "(0)" after "ThisWorkbook.Close", as in
ThisWorkbook.Close (0), but still nothing.
Any ideas what he problem could be?
thanks
Sub CloseWB()
Application.DisplayAlerts = False
ThisWorkbook.Close
Application.DisplayAlerts = True
End Sub
this doens; work either:
ThisWorkbook.Close SaveChanges:=False
I even tried adding "(0)" after "ThisWorkbook.Close", as in
ThisWorkbook.Close (0), but still nothing.
Any ideas what he problem could be?
thanks