Hello,
I use email subs routinely to pass WS/WB information around all the time. A request was generated that I add in a function so that users could send me a note about comments or suggestions on how certain WB's are working for the users; kind of like a "contact the webmaster" kind of thing. I was going to just whip up another userform but I was thinking that since it will only be a single string of text for the comment, and that it would always be coming to me; it would be more convenient if I just used an inputbox. I tweaked the code that I have been using for the inputbox function, but I am stumped on the part about the "activesheet" Since a WS may or may not be open, well I suppose there is always a WS open, but I am not taking any data from the WS, so I don't need to reference it. The text is coming from the inputbox so I need to figure out what syntax I use to call the mailenvelope, I tried "Inputbox.mailenvelope" and that didn't work.
Does anyone have any suggestions? I appreciate any ideas -thanks
I use email subs routinely to pass WS/WB information around all the time. A request was generated that I add in a function so that users could send me a note about comments or suggestions on how certain WB's are working for the users; kind of like a "contact the webmaster" kind of thing. I was going to just whip up another userform but I was thinking that since it will only be a single string of text for the comment, and that it would always be coming to me; it would be more convenient if I just used an inputbox. I tweaked the code that I have been using for the inputbox function, but I am stumped on the part about the "activesheet" Since a WS may or may not be open, well I suppose there is always a WS open, but I am not taking any data from the WS, so I don't need to reference it. The text is coming from the inputbox so I need to figure out what syntax I use to call the mailenvelope, I tried "Inputbox.mailenvelope" and that didn't work.
Does anyone have any suggestions? I appreciate any ideas -thanks
Code:
Private Sub EmailGo_Click()
Dim myValue As Variant
myValue = InputBox("Please type in your comments", "Comments and Suggestions")
With ActiveSheet.MailEnvelope
.Introduction = " A comment or suggestion has been made about the Facilities Inspection App. "
.Item.To = "first.name@company.com"
.Item.Subject = "Inspection App Comment"
.Item.Body = myValue
.Item.Send
End With
End Sub