Email userform textbox values

rickblunt

Well-known Member
Joined
Feb 18, 2008
Messages
609
Office Version
  1. 2019
Platform
  1. Windows
Greetings, just wondering if something is possible. I have used VBA to send emails containing the contents of worksheet cells, but I have never sent an email from a userform before. Has anyone ever tried to send an email from a userform where the email would contain the values from some of the userform textboxes?

The application would be that I am using userforms to document equipment condition, that part is all completed. Currently after the data goes in to the WB I then go back and create emails for all of the items that need to be repaired. The information that I am sending out in the emails is the same as what is being recorded on the userform. I got to thinking that wouldn't it be cool if when the data was sent to the WS it also did the email at the same time. I know that I could back door it and get the data from the WS, but the cells on the WS where the data goes to is dynamic. The data in the textboxes are static so to me it would be easier to code that for the email sub....

I have been searching the forums for something like this and haven't found anything yet. Does anyone out there think that this is possible?

Thanks
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Follow up to my question....


Here is the code that I use to send WS cell data via email, and it works fine. But if I am going to try this from a userform then I do not know how to range the textbox values, tried simply substituting references but I am getting compile errors on the method so I am guessing that the EnvelopeVisible property is not appropriate for userforms...


Code:
Sub Send_PolisherEmail()
    
   ActiveSheet.Range("B2:B10").Select
     
   ActiveWorkbook.EnvelopeVisible = True
   
   With ActiveSheet.MailEnvelope
      .Introduction = "We have just installed the backup resin bed.  Please provide a new one at your earliest convenience. "
      .Item.To = "username@company email"
      .Item.Subject = "New resin bed needed"
      .Item.Send
   End With
   End Sub
 
Upvote 0

Forum statistics

Threads
1,223,961
Messages
6,175,652
Members
452,664
Latest member
alpserbetli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top