Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default E-mail a worksheet, then auto open another and do the same by valueof a cell

Can I, by the value of a cell in Sheet1, force multiple worksheets to
open, e-mail the sheet, close and perform the same set of events from
one worksheet to the next? I am using the following macro to get the
first sheet to open and e-mail a copy of itself:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveWorkbook.Worksheets("Sheet1").Range("O8").Va lue = 1 Then
ActiveWorkbook.Worksheets("Sheet1").Copy
ActiveWorkbook.SendMail Worksheets("Sheet1").Range("O9"),
Worksheets("Sheet1").Range("L4")
ActiveWorkbook.Close False
End If
End Sub

O8 is the trigger that initiates the event
O9 is the recipient's e-mail address
L4 is an accompanying message in the title of the message

Thanks for any help anyone can provide.

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default E-mail a worksheet, then auto open another and do the same by value of a cell


Maybe this ?
http://www.rondebruin.nl/mail/folder1/mail5.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Michael Lanier" wrote in message
...
Can I, by the value of a cell in Sheet1, force multiple worksheets to
open, e-mail the sheet, close and perform the same set of events from
one worksheet to the next? I am using the following macro to get the
first sheet to open and e-mail a copy of itself:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveWorkbook.Worksheets("Sheet1").Range("O8").Va lue = 1 Then
ActiveWorkbook.Worksheets("Sheet1").Copy
ActiveWorkbook.SendMail Worksheets("Sheet1").Range("O9"),
Worksheets("Sheet1").Range("L4")
ActiveWorkbook.Close False
End If
End Sub

O8 is the trigger that initiates the event
O9 is the recipient's e-mail address
L4 is an accompanying message in the title of the message

Thanks for any help anyone can provide.

Michael


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default E-mail a worksheet, then auto open another and do the same byvalue of a cell

Thanks Ron. I'll be trying it later today, but from what I can tell,
it looks to be what I'm looking for.

Michael
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
Link Worksheet and Auto send e-mail Gaz259 Excel Worksheet Functions 2 February 11th 08 09:34 PM
Auto log off a user with a worksheet open? Sailonmike Excel Discussion (Misc queries) 1 February 1st 07 07:06 PM
Auto Open file to run Mail macro nospaminlich Excel Programming 1 October 23rd 06 08:20 PM
Auto run macro on individual worksheet open mr_teacher[_2_] Excel Programming 2 May 11th 06 10:15 PM
VBA Excel Solver ValueOf: Reference Problem Karl Excel Programming 3 July 9th 05 05:49 PM


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