Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sace and close
I want to have a macro assigned to a button so that when the button is
pressed the current file is saved and then excel is exited. I tried: - Sub Closea() ThisWorkbook.Save Application.Select.Close End Sub But no good. Saving works but not close. Sub Closea() ThisWorkbook.Save ThisWorkbook.Close End Sub Will close the workbook but not excel itself. Any ideas? --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sace and close
application.quit
Application.Select.Close arno |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sace and close
ianripping < wrote:
I want to have a macro assigned to a button so that when the button is pressed the current file is saved and then excel is exited. I tried: - Sub Closea() ThisWorkbook.Save Application.Select.Close End Sub But no good. Saving works but not close. To close use Application.Quit Regards, -- Beto Reply: Erase between the dot (inclusive) and the @. Responder: Borra la frase obvia y el punto previo. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sace and close
OK Brilliant this works fine, is it possible to make excel save change
to all open workbooks instead of: - ThisWorkbook.Sav -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sace and close
Hi
try For Each w In Workbooks w.save Next w Frank OK Brilliant this works fine, is it possible to make excel save changes to all open workbooks instead of: - ThisWorkbook.Save --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sace and close
Thanks Frank. Works great. Not too sure how it does but it does
-- Message posted from http://www.ExcelForum.com |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sace and close
Thanks Frank. Works great. Not too sure how it does but it does
-- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why excel close all files when I just want to close one files | Excel Discussion (Misc queries) | |||
why do all excel worksheets/workbooks close when I close one? | Excel Discussion (Misc queries) | |||
close button does not close | Excel Discussion (Misc queries) | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel |