Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
yh73090
 
Posts: n/a
Default Warning! Time has expired....


Help!!!
I've been given a spreadsheet and asked to come up with a way to have
an alert sent via email when the difference between two dates expires.
Well I found the code for sending an email, but it needs to be
triggered by clicking a button.
This is the code I have for this: (Continued request below Code)

Sub Email()
Dim oApp
Dim oMess
Dim eRange As Range
Dim i As Long

Application.ScreenUpdating = False
Set oApp = CreateObject("Outlook.Application")
Set eRange = Range("A1")
Do
Set oMess = oApp.CreateItem(0)
With oMess
.To = eRange.Offset(i, 0)
.Subject = "Your time has expired"
.Body = "Joe, Moe, and Larry" & vbNewLine & vbNewLine & _
"Please goto the Stooges spreadsheet and handle the
problem."
.send
End With
Set oMess = Nothing
i = i + 1
'stop on the first blank cell in column a or b etc
Loop While eRange.Offset(i, 0) ""

Set oApp = Nothing
Application.ScreenUpdating = True
End Sub

My second question is how to create a expiration date, I am looking for
the number of workdays between two dates.

Thank you so much for all your help.
Yo


--
yh73090
------------------------------------------------------------------------
yh73090's Profile: http://www.excelforum.com/member.php...fo&userid=7510
View this thread: http://www.excelforum.com/showthread...hreadid=483702

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
Time Problem B. Baumgartner Excel Discussion (Misc queries) 2 June 30th 05 09:05 PM
Time Sheet Calculation Help Needed! sax30 Excel Worksheet Functions 2 April 26th 05 08:08 PM
mulitiplying time Brad Excel Worksheet Functions 1 February 1st 05 07:15 PM
Calculating tvl time in Excel 2000 Rev.9.2720 Brandi Excel Worksheet Functions 5 January 27th 05 09:15 PM
entering numbers to display a time format Ian Williams/Eazygig Excel Discussion (Misc queries) 1 January 10th 05 11:57 AM


All times are GMT +1. The time now is 05:46 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"