#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple message box question zeyneddine Excel Discussion (Misc queries) 4 August 23rd 06 06:08 PM
Simple message box question zeyneddine Excel Discussion (Misc queries) 1 August 14th 06 08:23 PM
How do I add an alert message upon a user closing the workbook? ehoskins Excel Discussion (Misc queries) 1 July 12th 06 10:48 PM
Can I have error message when formula is over value? dvozar Excel Worksheet Functions 2 June 19th 06 04:43 PM
Excel Error Message Mark Excel Worksheet Functions 3 June 1st 05 02:41 PM


All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"