Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Message box when date expires


Greetings,

Does any one know of a code that will prompt a message box after a
certain date has been reached.

Application in my mind is to have a spread sheet that keeps up with
warranties and expiration dates. If I have a radio that has a one year
warranty. One year after a date that is entered in, say cell "B2",
prompt message box - "The warranty on Sony radio, model XGX has
expired".

Maybe this is a good one for you expert programmers!!!

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=379971

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Message box when date expires


I am not sure if this is what you want.

copy the below code in "this workbook" at vba editor



Private Sub Workbook_Open()
If Worksheets("Sheet1").Range("b2").Value Now Then
MsgBox "item warranty has expired"
End If

End Su

--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...fo&userid=1627
View this thread: http://www.excelforum.com/showthread.php?threadid=37997

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Message box when date expires


Ok, where in the right direction, but how do we observe more than one
cell, with this code, say B2 and B3. What I tried didn't work.

Private Sub Workbook_Open()
If Worksheets("Sheet1").Range("b2").Value Now Then
MsgBox "Sony warranty has expired"

If Worksheets("Sheet1").Range("b3").Value Now Then
MsgBox "Fuji warranty has expired"

End If
End Sub


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=379971

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Message box when date expires


Never mind, I got it!!!

This is the code:

Private Sub Workbook_Open()
If Worksheets("Sheet1").Range("b2").Value < Now Then
MsgBox "Sony XGX Warranty has a EXPIRED"

End If
If Worksheets("Sheet1").Range("b3").Value < Now Then
MsgBox "Fuji XGX Warranty has a EXPIRED"

End If
End Sub

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=379971

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Message box when date expires

Interesting method, but you should note.

1. For every item you need to write a conditional piece of code - not
efficient
2. The location and message are hard coded for each msgbox - programme and
data maintenance would be tortuous
3. For every item you get a Msgbox, each has to be dismissed before the next
one appears - tedious for the user and annoying!

That said if it only a couple of items then I guess it is not a problem. If
the list is longer suggest you repost for a better solution.

--
Cheers
Nigel



"EMoe" wrote in message
...

Never mind, I got it!!!

This is the code:

Private Sub Workbook_Open()
If Worksheets("Sheet1").Range("b2").Value < Now Then
MsgBox "Sony XGX Warranty has a EXPIRED"

End If
If Worksheets("Sheet1").Range("b3").Value < Now Then
MsgBox "Fuji XGX Warranty has a EXPIRED"

End If
End Sub

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile:

http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=379971





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Message box when date expires

What about having a cell next to the item with your warning message entered
as text with the same colour as the background, white on white. Then use
conditional formating to change the font to Black on Red after the expiry of
the waranty.
This way you can have as many items as you want.

Chris

"Nigel" wrote in message
...
Interesting method, but you should note.

1. For every item you need to write a conditional piece of code - not
efficient
2. The location and message are hard coded for each msgbox - programme and
data maintenance would be tortuous
3. For every item you get a Msgbox, each has to be dismissed before the
next
one appears - tedious for the user and annoying!

That said if it only a couple of items then I guess it is not a problem.
If
the list is longer suggest you repost for a better solution.

--
Cheers
Nigel



"EMoe" wrote in
message
...

Never mind, I got it!!!

This is the code:

Private Sub Workbook_Open()
If Worksheets("Sheet1").Range("b2").Value < Now Then
MsgBox "Sony XGX Warranty has a EXPIRED"

End If
If Worksheets("Sheet1").Range("b3").Value < Now Then
MsgBox "Fuji XGX Warranty has a EXPIRED"

End If
End Sub

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile:

http://www.excelforum.com/member.php...o&userid=23183
View this thread:
http://www.excelforum.com/showthread...hreadid=379971





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
Date expires in 2 years Catguam Excel Worksheet Functions 2 September 22nd 08 09:01 PM
To delete a row automatically ocne a closing date expires. bollard Excel Discussion (Misc queries) 9 March 29th 07 03:30 PM
How to set up alarm for cell has entry as date when it expires? Vinod Menon Excel Worksheet Functions 1 October 18th 05 06:20 AM
Macro expires Louise Excel Programming 2 October 13th 04 12:53 PM
creating a demo that expires after time S. Housley Excel Programming 0 June 24th 04 06:36 PM


All times are GMT +1. The time now is 09:01 PM.

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

About Us

"It's about Microsoft Excel"