Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The last part of my macro is a save command:
ActiveWorkbook.SaveAs Filename:="H:\Personal\SIGINCUSTODY.csv", FileFormat _ :=xlCSV, CreateBackup:=False The file is saved to its required location in csv format. I then have a command that says ActiveWorkbook.Close, however, this command will not work automatically. First of all I get asked the question "Do you want to save the changes you made to SIGINCUSTODY". After pressing Yes it asks me to select the location where the file should be saved. I select the file name as above (to where the file has already been saved). I then asked do I want to overwrite the file (as i have already saved it earlier in the macro) and finally I get asked am I sure that I want to save in csv format. Is there anyway of just closing the file without being asked all these questions ? Thanks Steve |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Steve,
Is there anyway of just closing the file without being asked all these questions ? Su ActiveWorkbook.Close SaveChanges:=False Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Nikos and Jan
-----Original Message----- Hi Steve, Is there anyway of just closing the file without being asked all these questions ? Su ActiveWorkbook.Close SaveChanges:=False Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve,
ActiveWorkbook.Close False will close the workbook without prompting to save - and without saving, but since you've only just saved, that should be OK. HTH, Nikos "Steve" wrote in message ... The last part of my macro is a save command: ActiveWorkbook.SaveAs Filename:="H:\Personal\SIGINCUSTODY.csv", FileFormat _ :=xlCSV, CreateBackup:=False The file is saved to its required location in csv format. I then have a command that says ActiveWorkbook.Close, however, this command will not work automatically. First of all I get asked the question "Do you want to save the changes you made to SIGINCUSTODY". After pressing Yes it asks me to select the location where the file should be saved. I select the file name as above (to where the file has already been saved). I then asked do I want to overwrite the file (as i have already saved it earlier in the macro) and finally I get asked am I sure that I want to save in csv format. Is there anyway of just closing the file without being asked all these questions ? Thanks Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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) | |||
closing excel after closing a workbook | Excel Programming | |||
Problem in closing Excel App with translated excel macro | Excel Programming |