Hello all
I am trying to get some assistance on the code "application.dialogs xldialogsendmail .show _" i am using this to send an email from Excel.
I have set up mu code to run this as required but now i am looking for something that will set a cell value as current time and date when the email has been sucesfully sent.
I am in aposition where i am gett8ing the time and date stamp where i want it BUT, not only does it stamp the time when i send the email BUT when i cancell sending the email aswell. Is there anyway i can get the code to only time stamp when an email has been sent?
Thanks in advance for your assistance.
I am trying to get some assistance on the code "application.dialogs xldialogsendmail .show _" i am using this to send an email from Excel.
I have set up mu code to run this as required but now i am looking for something that will set a cell value as current time and date when the email has been sucesfully sent.
I am in aposition where i am gett8ing the time and date stamp where i want it BUT, not only does it stamp the time when i send the email BUT when i cancell sending the email aswell. Is there anyway i can get the code to only time stamp when an email has been sent?
Code:
Sub Approved()
'Set variable for subject and prefix with approval
Dim WSName1 As String, CName1 As String, savename1 As String
Dim Subject As String
'SET Filename
WSName1 = "Header"
CName1 = "CR_Num"
savename1 = Sheets(WSName1).Range(CName1).Text
Subject = "Approved & Ready ~" & savename1 & " " & "Assessment.xlsx"
'Send email with
Application.Dialogs(xlDialogSendMail).Show _
arg1:="test@abc.org;", _
arg2:=Subject
Range("Completed").Value = FormatDateTime(Now, vbGeneralDate)
End Sub
Thanks in advance for your assistance.