ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using a cell value as the subject line (https://www.excelbanter.com/excel-programming/331170-using-cell-value-subject-line.html)

Qaspec

Using a cell value as the subject line
 
How do I use the cell value from cell a8 as the subject line in the following
code?
More specifically the words "QA Snapshot" and "the value of cell (a8)"

Private Sub Send1_Click()

Dim strdate As String

ActiveSheet.Copy
strdate = Format(Date, "mm-dd-yy")
ActiveSheet.Name = "QA Snapshot"
ActiveWorkbook.SaveAs "QA Snapshot" & " " & strdate & ".xls"
ActiveWorkbook.SendMail "", _
"QA Snapshot"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub

Vasant Nanavati

Using a cell value as the subject line
 
ActiveWorkbook.SendMail "", _
"QA Snapshot" & Range("A8")

--

Vasant


"Qaspec" wrote in message
...
How do I use the cell value from cell a8 as the subject line in the

following
code?
More specifically the words "QA Snapshot" and "the value of cell (a8)"

Private Sub Send1_Click()

Dim strdate As String

ActiveSheet.Copy
strdate = Format(Date, "mm-dd-yy")
ActiveSheet.Name = "QA Snapshot"
ActiveWorkbook.SaveAs "QA Snapshot" & " " & strdate & ".xls"
ActiveWorkbook.SendMail "", _
"QA Snapshot"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com