Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Message alert
Hi all,
Is there anyway I can create a pop up message that would remind the user to do something upon opening an Excel sheet and on closing the Excel sheet? This sheet is something our users are editing but it would be nice to have them automatically reminded to perform a specific action. We are using Excel 2002 and Excel 2003. I know there are message alerts I can create but I think they only apply if someone fills in certain data in a cell. Any help would be greatly appreciated. Thanks! LaurenM |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Message alert
Lauren
You could put some code in the Workbook_Open() event that would fire each time the workbook is opened Private Sub Workbook_Open() MsgBox "You must do this!" End Sub You could put the closing code in the Workbook_BeforeClose() event like so Private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox "Have you done this?" End Sub These sit in the ThisWorkbook module. This can be accessed by right clicking the small Excel icon next to the file menu and selecting 'View code' -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Hi all, Is there anyway I can create a pop up message that would remind the user to do something upon opening an Excel sheet and on closing the Excel sheet? This sheet is something our users are editing but it would be nice to have them automatically reminded to perform a specific action. We are using Excel 2002 and Excel 2003. I know there are message alerts I can create but I think they only apply if someone fills in certain data in a cell. Any help would be greatly appreciated. Thanks! LaurenM |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Message alert
Brilliant! This worked perfectly! Thanks you so much for your fast reply!
LaurenM "Nick Hodge" wrote: Lauren You could put some code in the Workbook_Open() event that would fire each time the workbook is opened Private Sub Workbook_Open() MsgBox "You must do this!" End Sub You could put the closing code in the Workbook_BeforeClose() event like so Private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox "Have you done this?" End Sub These sit in the ThisWorkbook module. This can be accessed by right clicking the small Excel icon next to the file menu and selecting 'View code' -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Hi all, Is there anyway I can create a pop up message that would remind the user to do something upon opening an Excel sheet and on closing the Excel sheet? This sheet is something our users are editing but it would be nice to have them automatically reminded to perform a specific action. We are using Excel 2002 and Excel 2003. I know there are message alerts I can create but I think they only apply if someone fills in certain data in a cell. Any help would be greatly appreciated. Thanks! LaurenM |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Message alert
Lauren
In the Before_Close() you can also use the Cancel Parameter to stop the close if you know something is wrong Cancel=True -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Brilliant! This worked perfectly! Thanks you so much for your fast reply! LaurenM "Nick Hodge" wrote: Lauren You could put some code in the Workbook_Open() event that would fire each time the workbook is opened Private Sub Workbook_Open() MsgBox "You must do this!" End Sub You could put the closing code in the Workbook_BeforeClose() event like so Private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox "Have you done this?" End Sub These sit in the ThisWorkbook module. This can be accessed by right clicking the small Excel icon next to the file menu and selecting 'View code' -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Hi all, Is there anyway I can create a pop up message that would remind the user to do something upon opening an Excel sheet and on closing the Excel sheet? This sheet is something our users are editing but it would be nice to have them automatically reminded to perform a specific action. We are using Excel 2002 and Excel 2003. I know there are message alerts I can create but I think they only apply if someone fills in certain data in a cell. Any help would be greatly appreciated. Thanks! LaurenM |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Message alert
Great! I will give this a try too.
Thanks again! LaurenM "Nick Hodge" wrote: Lauren In the Before_Close() you can also use the Cancel Parameter to stop the close if you know something is wrong Cancel=True -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Brilliant! This worked perfectly! Thanks you so much for your fast reply! LaurenM "Nick Hodge" wrote: Lauren You could put some code in the Workbook_Open() event that would fire each time the workbook is opened Private Sub Workbook_Open() MsgBox "You must do this!" End Sub You could put the closing code in the Workbook_BeforeClose() event like so Private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox "Have you done this?" End Sub These sit in the ThisWorkbook module. This can be accessed by right clicking the small Excel icon next to the file menu and selecting 'View code' -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Hi all, Is there anyway I can create a pop up message that would remind the user to do something upon opening an Excel sheet and on closing the Excel sheet? This sheet is something our users are editing but it would be nice to have them automatically reminded to perform a specific action. We are using Excel 2002 and Excel 2003. I know there are message alerts I can create but I think they only apply if someone fills in certain data in a cell. Any help would be greatly appreciated. Thanks! LaurenM |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Message alert
Hi Nick,
I tried this and it works so that I can go back to the sheet and do what it is I forgot to do. However, it won't let me close the sheet after I have completed my task. Do I need to do something else besides just adding "Close=True" in my code? Thanks so much for your help with this! Lauren "Nick Hodge" wrote: Lauren In the Before_Close() you can also use the Cancel Parameter to stop the close if you know something is wrong Cancel=True -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Brilliant! This worked perfectly! Thanks you so much for your fast reply! LaurenM "Nick Hodge" wrote: Lauren You could put some code in the Workbook_Open() event that would fire each time the workbook is opened Private Sub Workbook_Open() MsgBox "You must do this!" End Sub You could put the closing code in the Workbook_BeforeClose() event like so Private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox "Have you done this?" End Sub These sit in the ThisWorkbook module. This can be accessed by right clicking the small Excel icon next to the file menu and selecting 'View code' -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Hi all, Is there anyway I can create a pop up message that would remind the user to do something upon opening an Excel sheet and on closing the Excel sheet? This sheet is something our users are editing but it would be nice to have them automatically reminded to perform a specific action. We are using Excel 2002 and Excel 2003. I know there are message alerts I can create but I think they only apply if someone fills in certain data in a cell. Any help would be greatly appreciated. Thanks! LaurenM |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Message alert
Lauren
You would structure the code something like Private Sub Workbook_BeforeClose(Cancel As Boolean) If Range("A1").Value < "Nick" Then Cancel = True Exit Sub End If End Sub This will stop the close if the cell A1 does not have Nick in it else it will not enter the If...Then condition and will close as normal -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Hi Nick, I tried this and it works so that I can go back to the sheet and do what it is I forgot to do. However, it won't let me close the sheet after I have completed my task. Do I need to do something else besides just adding "Close=True" in my code? Thanks so much for your help with this! Lauren "Nick Hodge" wrote: Lauren In the Before_Close() you can also use the Cancel Parameter to stop the close if you know something is wrong Cancel=True -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Brilliant! This worked perfectly! Thanks you so much for your fast reply! LaurenM "Nick Hodge" wrote: Lauren You could put some code in the Workbook_Open() event that would fire each time the workbook is opened Private Sub Workbook_Open() MsgBox "You must do this!" End Sub You could put the closing code in the Workbook_BeforeClose() event like so Private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox "Have you done this?" End Sub These sit in the ThisWorkbook module. This can be accessed by right clicking the small Excel icon next to the file menu and selecting 'View code' -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "laurenm" wrote in message ... Hi all, Is there anyway I can create a pop up message that would remind the user to do something upon opening an Excel sheet and on closing the Excel sheet? This sheet is something our users are editing but it would be nice to have them automatically reminded to perform a specific action. We are using Excel 2002 and Excel 2003. I know there are message alerts I can create but I think they only apply if someone fills in certain data in a cell. Any help would be greatly appreciated. Thanks! LaurenM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple message box question | Excel Discussion (Misc queries) | |||
Simple message box question | Excel Discussion (Misc queries) | |||
How do I add an alert message upon a user closing the workbook? | Excel Discussion (Misc queries) | |||
Can I have error message when formula is over value? | Excel Worksheet Functions | |||
Excel Error Message | Excel Worksheet Functions |