Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you don't want to save it:
dim wkbk as workbook set wkbk = workbooks.open(filename:="c:\....\book1.xls") 'do something to wkbk wkbk.close savechanges:=false goofy11 wrote: I recorded a simple macro that opens various files, manipulates them, and then builds a report. After doing some manipulation of 3 files, I want the macro to close them without saving automatically. When I recorded the macro, it brought up the dialog box "Do you want to save?" when I attempted to close each file. Now when I run the macro, the same dialog boxes come up, which requires my intervention. Is there a simple fix to disable this prompt from coming up and automatically close the files without saving? Below is an example of the recorded VBA. Windows("Modular Sales by Item Pivot.xls").Activate Application.CutCopyMode = False Range("A1").Select ActiveWindow.Close Thanks, Jeff -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
close without saving | Excel Discussion (Misc queries) | |||
File/Close automatically saving changes without prompt | Excel Discussion (Misc queries) | |||
close w/o saving | Excel Worksheet Functions | |||
VBA - Close without saving changes | Excel Discussion (Misc queries) | |||
Close without Saving In VBA | Excel Programming |