Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Right-click on the Excel Icon left of "File" on the menubar.
Select "View Code" and paste G'sS's code into that module. Do not place it in a sheet module as Mike suggested. Workbook_BeforeClose events do not run from worksheets but Mike may have been confused by your referring to a workbook as a "worksheet" Workbooks can contain one or more worksheets. You cannot "close" or "open" a worksheet. You can however "deactivate" or "activate" worksheets and run sheet event code. Gord Dibben MS Excel MVP On Mon, 21 Apr 2008 11:41:01 -0700, stevieboy1313 wrote: Thank you very much folks, but I couldn't get it to work. The sheet just closed like always. "Mike H" wrote: Hi, I should have said, Right click the sheet tab, view code, double click the appropriate sheet and paste the code in. Mike "stevieboy1313" wrote: I have read some suggestions for a pop-up box when opening a sheet, but how can I create a message box that appears when you close the worksheet? Any help will be appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - Closing One Sheet at a Time? | Excel Discussion (Misc queries) | |||
Add items to a combo box and make them available after closing the sheet | Excel Discussion (Misc queries) | |||
Closing the current focused sheet | Excel Discussion (Misc queries) | |||
How to prevent warning messages on protected work sheet. | Excel Worksheet Functions | |||
What is the VBA code to delete a sheet without warning message? | Excel Discussion (Misc queries) |