Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe this works for you ?
http://j-walk.com/ss/excel/tips/tip78.htm -- Regards, Juan Pablo González "jasonsweeney " wrote in message ... I am trying to run some code rightbefore a workbook closes. The code relates to resetting some passwords hidden in a worksheet. What I want is the code to execute after a person tries to close the workbook. Right now I am using the "BeforeClose" event. The problem here is that the code executes, and then Excel asks the user whether they want to save changes made to the worksheet before closing. If the person says no, then my the effect of my password codes does not take effect. I want to use the Workbook_BeforeClose event, which I think is the last event before the workbook closes, which would allow me to get my desired effect without allowing the user to "veto" the cnages I make to their worksheet right before it closes. However, nothing happens when I use the event. I think this is because I have to "create a new class module and declare an object of type Application with events." (VBA Help for WorkbookBeforeClose Event". I have noever done this before. Any suggestions? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_BeforeClose | Excel Discussion (Misc queries) | |||
Workbook_BeforeClose Event | Excel Programming | |||
File won't close when "beforeclose" event is used. | Excel Programming | |||
Cancelling the BeforeClose Event | Excel Programming | |||
BeforeClose event - Savings | Excel Programming |