+ Reply to Thread
Results 1 to 20 of 20

Sending an email to the name someone enters in a userform

  1. #1
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Question Sending an email to the name someone enters in a userform

    Hi all,

    I have created a ticketing system/issue logger with a userform. Users enter in the information on the Userform, and the data from their entry is logged on a single line in the spreadsheet. This is all working fine.

    Userform Interface:
    Userform Issue Logger.JPG

    One of the fields is the "Submitted By" textbox. I would like them to enter their name, and have an email be sent to them with a summary of the issue they just logged. However, I want the "Submitted By" field to be filled with their name, not their email address. So that adds in another step. The name will go on the issue log spreadsheet, while the email address is used for the email summary.

    My question is: Can I take the name they enter, find their corresponding email address, and then send them an email with a summary of the entered userform information?

    My team isn't that big, so I would be able to have a hidden sheet with names --> email addresses. Maybe a VLOOKUP is what I am looking for?

    It doesn't matter if they send themselves an Outlook email, or if I send them an Outlook email from my IT account.
    Body of the email or attachment, whatever is easiest.

    Kristen

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    Welcome to the Forum!!!

    What you're suggesting is eminently doable. How about mocking up a Workbook (dummy data) that's of the SAME STRUCTURE as your Actual File. Include a Sheet with Dummy Names and Email Addresses.

    Do you wish to send a COPY of the User Form or a Line Item from the Summary Sheet?

    Include in the Workbook ALL CODE you're currently using...I'll be glad to look at it.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    Hey John,

    I appreciate the welcome and help! This is my first ever experience in coding so I apologize if it is messy. Here is the full Excel book with fake/no data.

    Beta Issue Log - Mockup Data.xlsm

    As for your question, I am flexible about what is sent to the user. A line item would probably be easier (but again I am just guessing).

    Thanks again!

    Kristen

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    Should the User have the OPTION to send themselves the Ticket or should it be sent AUTOMATICALLY?

  5. #5
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    Hmm, right now there is a separate email button, but now that I think of it, I would prefer that button to not be there and instead an email to be sent once "SUBMIT" is hit.

    In the popup that says, "Your entry has been successfully logged!", I will most likely modify it to include, "An email has been sent to your account with a ticket number and summary." (or something of that nature)

    The email subject ideally would include the entered <Issue Title>, but again, I'm flexible and just brainstorming!

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    As I've been working through this I'm having a SCARY thought...please tell me this IS NOT going to be a "Shared File".

  7. #7
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    Oh gosh. Well right now it isn't, but we were hoping to have it in a shared folder that only our group of ~15 has access to. The current procedure is that I log everything manually myself. Having the file out and accessible was management's attempt to increase transparency.

    Shoot me down though if this is a bad idea!!

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    Google on this...then you tell me...

    "shared excel files problems"

  9. #9
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    Darn. I understand.

    Would you recommend just scrapping it? I was excited about it, but obviously its ability to function comes before anything else.

    If I make it read-only, then use the userform entry format myself to log and send emails, they could simply view the file to see the status of their issue. It's kinda gimmicky if I'm the only one using it, but we'll see.

    Thoughts?

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    I'll continue to work on it to "give you the functionality"; you can then decide "how you choose to use it".

  11. #11
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    John,

    Thanks again for all your help in this, you've been awesome.

    Kristen

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    Sorry for the delay...had dinner guests last evening.

    Try the Code in the attached. The Code will lookup the Email Address of the Submitted By Name and automatically send an Email to that Email Address with a Copy of the UserForm embedded in the Body of the Email.

    The Code currently Displays the Email. In Module 3 change this to Send...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    First I want to say thank you so much! I appreciate you taking the time to write that (and format what horrible code I had so far).

    A quick question: Sometimes when copying the userform into an email, it gets cut off/cropped too short (pictured below). How do you change the dimensions of the screenshot? The userform appears in full when first pulled on the new sheet, between steps.

    UF Screenshot.JPG

    Sorry to bug you again. Hope all is well with you.

    Kristen

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    You say
    Sometimes when copying the userform into an email, it gets cut off/cropped too short
    Which infers it does not happen "All the time". What's different when it "Does" happen?

  15. #15
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    John,

    My mistake with wording -- It does indeed happen every time. I have added in new fields on the userform interface since I first sent it over to you. So while before it wasn't getting cut off, now it is.

  16. #16
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    In this Code (Module 2) try expanding the Range. You should be able to tell how far from this
    The userform appears in full when first pulled on the new sheet, between steps.
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    Hey John,

    Well I'm back. I considered starting a new thread but figured you're already familiar with the program.

    I am having problems with one section in Module1. I receive the error "PasteSpecial method of Worksheet class failed" and then the section below highlights.
    Please Login or Register  to view this content.
    A blank Excel sheet displays with nothing on it.

    Here it is in the context (full module):

    Please Login or Register  to view this content.
    Ideas?

  18. #18
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    The Code works in the version of the File attached to Post #12.

    I'll need to see your File (with existing Code) to see what's happening.

  19. #19
    Registered User
    Join Date
    10-21-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Office 2013
    Posts
    13

    Re: Sending an email to the name someone enters in a userform

    Here it is in full. SME LOG - Fake Data.xlsm You can see right now it is kinda messy.

    I have not been able to recreate the error so I am lost as what to do/how to fix it. It has only happened one time that I know of.

    Thanks again.

  20. #20
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Sending an email to the name someone enters in a userform

    Hi Kristen

    The Code appears to run as expected.

    If the issue reappears, you may wish to set the Wait Time to two or three seconds here...
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. olMail - Email Attachment Variable. Sending Email through Excel
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2014, 07:41 AM
  2. [SOLVED] sending email with specific range as email body vba modification
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2014, 11:24 AM
  3. UserForm: Command Button enters numeric value to text box
    By Gal403 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-07-2014, 12:01 AM
  4. [SOLVED] sending outlook email from userform
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-04-2013, 01:56 AM
  5. Check for Duplicates when user enters values in the UserForm
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-27-2012, 03:43 PM
  6. [SOLVED] UserForm Enters Final Data Into First Row
    By LoneWolf3574 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-01-2012, 07:46 PM
  7. VBA Excel Userform Sending Email
    By Ironman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2009, 04:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1