Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm working on an add-in that will have a user form. I'd like the form to
save its input between shows of it. Apparently the only way to save the input is in cells on a spreadsheet. That's okay, but I don't want the user to be asked if they want to save when closing the add-in. What event do I call so that it exits without asking to save? Don <donwiss at panix.com. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Setting the Saved property of the Workbook to True tells Excel there are in
effect no changes and no need to save the workbook. The prompt will not appear if you set this to true. (ThisWorkbook.Saved = True) Perhaps it goes without saying, but I'll say it anyway: You should not carelessly cause a user's work to be discarded, which could happen if you set this property to True, but do not save the workbook yourself. Workbook_BeforeClose event is an event that is raised, as it says, before closing. You can do clean up in response to this event. Alternatively, you could save your form data in the registry (using SaveSetting, GetSetting) or in a file (using something like Open Environ("APPDATA") & "\MyApp\Settings.csv" for Output as #1: Print #1, data: Close #1). Bob "Don Wiss" wrote in message ... I'm working on an add-in that will have a user form. I'd like the form to save its input between shows of it. Apparently the only way to save the input is in cells on a spreadsheet. That's okay, but I don't want the user to be asked if they want to save when closing the add-in. What event do I call so that it exits without asking to save? Don <donwiss at panix.com. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook-Close StopTimer event | Excel Discussion (Misc queries) | |||
before close event with condition | Excel Discussion (Misc queries) | |||
Workbook Close Event | Excel Programming | |||
Trapping Excel Close event | Excel Programming | |||
After Close Event? | Excel Programming |