![]() |
|
|
|
#1
|
||||
|
||||
|
Hi Folks, am new to the site, nice to meet you all. Is it possible for excel to receive a cvs file then as soon as the data finishes filling the cells excel automatically send out the data to a list of people via email or sms. Then when new data is generated and recieved to repeat the process. It will be required to do this several times per hour. Thanks for reading. Last edited by Shevvy; 08-01-2012 at 08:44 PM. Reason: typo's |
|
#2
|
|||
|
|||
|
Hi
Try this code. It has been supplied by Ron Debruin 's Web site http://www.rondebruin.nl/. Right click on the name tab of the worksheet that changes and select View Code. Change the left hand drop box to Worksheet. Paste the code below and save the workbook and text. You will need to change the email addresses in the code below to those that you need. This will generate an email as soon as anything changes on the worksheet and covers up to 1 million rows. This can be changed if you want a smaller area to be checked. Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1:XFD100000")) Is Nothing Then
Dim Msg As String
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Msg = "Worksheet has changed. Here is the updated Worksheet."
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = "emailaddr1; emailaddr2; emailaddr3"
.CC = ""
.BCC = ""
.Subject = "Worksheet Updates"
.Body = Msg
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End If
End Sub
Tony Last edited by macropod; 09-07-2012 at 09:02 PM. Reason: Added code tags & formatting |
|
#3
|
||||
|
||||
|
Hi Tony, sorry for the late reply, have only just got back home. Anyway thanks for the reply I will try it now.
later Fred |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Send Receive setting file?
|
markg2 | Outlook | 3 | 02-16-2012 08:01 AM |
Outlook send/receive
|
btfernandes | Outlook | 1 | 08-10-2011 02:20 PM |
send/receive error
|
sureshk89 | Outlook | 1 | 01-28-2011 09:37 AM |
| Outlook 2007 how to disable automatically send/receive proccess | chriskaza81 | Outlook | 0 | 12-17-2010 03:06 AM |
| Send/receive Outlook | jenny52 | Outlook | 2 | 04-22-2009 01:16 PM |