Hi all. Some context first. I have a working spreadsheet that has a basic automated email macro (i.e., click this button and will email someone). It looks like this -
If possible I'd like to add an editable pop-up box similar to the MsgBox, but editable, so that whoever is clicking the button can add a comment that will then be included in the body of the email. Not sure if something like this can be added to a macro, any suggections?
Thanks!!
Excel Formula:
Sub EMAIL()
'Set email objects
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
'Set up Outlook
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
'Create Mail in Outlook
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hello," & vbNewLine & vbNewLine & _
"XXXX" & vbNewLine & vbNewLine & _
"**********THIS EMAIL HAS BEEN AUTOMATICALLY GENERATED, PLEASE DO NOT RESPOND**********"
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "XXXX"
.Body = strbody
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
MsgBox ActiveCell.Value & vbNewLine & _
"NOTIFICATION SENT"
End Sub
If possible I'd like to add an editable pop-up box similar to the MsgBox, but editable, so that whoever is clicking the button can add a comment that will then be included in the body of the email. Not sure if something like this can be added to a macro, any suggections?
Thanks!!