View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Disable save/saveas dialog box upon closing

Schatzi has brought this to us :
On May 3, 3:29*pm, GS wrote:
Another approach to closing without saving (and thus not raising the
alert) is...

* WorkbookObject.Close SaveChanges:=False

Of course, 'WorkbookObject' still requires a fully qualified ref be
'Set' to the workbook being closed.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


I don't know what you mean by fully qualified reference. I imagine
that since I do not know what that means, I must not have done that
correctly.


Your code suggests that 'WorkbookObject' refs a specific open workbook,
and so this object variable should have been initialized at some point
elsewhere in your code using the 'Set' statement something like...

Set WorkbookObject = Workbooks("Filename.xls")

Otherwise, 'WorkbookObject' means nothing to VBA.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc