Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Close and save all changes
Could anyone write me a macro to close the spreadsheet and prompt t
save changes? I need to link it to a button on my spreadsheet. thanks for any hel -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Close and save all changes
Surely just clicking the X at the top left will produce
this. However, if you want a button to do this then create the button and in the code put ThisWorkBook.Close If changes have been made then you will be prompted to save them. hth -----Original Message----- Could anyone write me a macro to close the spreadsheet and prompt to save changes? I need to link it to a button on my spreadsheet. thanks for any help --- Message posted from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Close and save all changes
thats great, but i would like it to close Excel if pos...:
-- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Close and save all changes
Greg,
Try Private Sub CommandButton1_Click() Application.ScreenUpdating = False MsgBox "Be Sure You Save Before you close this Program" ActiveWorkbook.Save End Sub Your Friend Charles Ps it on your copy I sent you -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Close and save all changes
You'd want to use "Application.Quit" in your code.
But I sometimes have multiple workbooks open at one time. It might be nicer to just let the user close excel. "Souljah <" wrote: thats great, but i would like it to close Excel if pos...:) --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to save and close, then copy file | Excel Discussion (Misc queries) | |||
How to code the Macro to save and close a file? | Excel Discussion (Misc queries) | |||
Macro to save & close all opened files | Excel Discussion (Misc queries) | |||
Close and save macro | Excel Programming | |||
getting same save-on-close macro to work from different networklocations | Excel Programming |