Home > Mobile >  Update =NOW() -- before -- generating email with hyperlink
Update =NOW() -- before -- generating email with hyperlink

Time:07-15

Have a hyperlink in B7 generating email, which uses E7 with =NOW() that goes as part of email's subject line. Using below code updates only after generating email, need before:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("b7")) Is Nothing Then 'before email is generated to update =NOW in E7
Application.Calculate
End If
End Sub

CodePudding user response:

If your are using the HYPERLINK-function you can put NOW in the subject part:

=HYPERLINK("mailto:[email protected]?subject=Report FROM " & TEXT(NOW(),"dd.MM.YYYY hh:nn"),"send mail")

  • Related