Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Warning upon closing sheet
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. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Warning upon closing sheet
Hi,
Right click the sheet tab, double click the appropriate sheet and paste this in. Private Sub Worksheet_Deactivate() MsgBox "Your closing thid sheet!!" End Sub 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. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Warning upon closing sheet
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. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Warning upon closing sheet
Put this macro in the workbook code area:
Private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox ("YOU HAVE BEEN WARNED!!!!") End Sub -- Gary''s Student - gsnu200781 "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. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Warning upon closing sheet
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. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Warning upon closing sheet
Hi,
If you followed the guidance for instaling the macro and I suggest you re-read and try again and it still doesn't work then macros may be disabled so try enabling them Mike "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. |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Warning upon closing sheet
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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) |