LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet Mailing Conditions

I have the following code:

Sub Mail_ActiveAheet()
Dim strDate as String
ActiveSheet.Copy
strDate = Format(Date, "dd-mm-yy") & " " & _
Format(Time, "h-mm-ss")
ActiveWorkbook.SaveAs "Part of " & ThisWorkbook.Name _
& " " & strDate & ".xls"
ActiveWorkbook.SendMail ", _
"Subject Line"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkBook.FullName
ActiveWorkbook.Close False
End Sub

....and I am using it to send a read receipt to my email
address when the Excel file has been opened. I have a
hidden worksheet that includes the current date and time
that the file was opened. This hidden sheet is what gets
sent to me. What I need to do is figure out how to get
Excel to set a variable that will be checked when the file
is opened more than once. I don't want to get an email
everytime it's opened, just the first time. Is this
possible? Thanks.
 
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
E-mailing a worksheet big_wilkie Excel Discussion (Misc queries) 1 October 9th 09 05:30 AM
E-mailing worksheet from Excel -- only one tab Ted Metro Excel Discussion (Misc queries) 1 May 8th 08 12:26 AM
e-mailing one worksheet Steve Excel Discussion (Misc queries) 2 March 10th 06 08:46 PM
E-mailing a Protected Worksheet Gabe Excel Discussion (Misc queries) 1 February 10th 06 02:58 AM
Worksheet e-mailing Always Frustrated Excel Worksheet Functions 1 June 22nd 05 10:52 PM


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