+ Reply to Thread
Results 1 to 14 of 14

UserForm automatic email with voting options???

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    UserForm automatic email with voting options???

    Hi,

    So I have a userform designed and ready to programme but I have very limited VBA knowledge. I want two buttons on the userform:

    1. A submit button which will automatically email all of the data from the userform to a pre-determined email address, in the email will also be an accept/reject voting option.
    2. A clear button that clears all text from the text boxes in the userform

    I know this is very limited information to go off but please let me know what more you need to know to complete this and I will be happy to provide more specific information. I have attached a picture of the userform in question.

    Thank you!

    Chris
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UserForm automatic email with voting options???

    Read here about voting option
    http://www.excelforum.com/excel-prog...ng-button.html

    and for clear form
    just make all {insert textbox/combobox name}.value = ""
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: UserForm automatic email with voting options???

    Thing is, I don't know how to set any of it up! I don't know how to setup the 'submit leave request' button

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UserForm automatic email with voting options???

    please include sample file
    i cannot provide you any code as it will have to be representative to what you have in your userform

  5. #5
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: UserForm automatic email with voting options???

    File attached, on the 'Holidays' tab you will see 'Leave Request Button', this opens the form.

    Thank you
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UserForm automatic email with voting options???

    the second part of the you question can be solved by

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: UserForm automatic email with voting options???

    Quote Originally Posted by humdingaling View Post
    the second part of the you question can be solved by

    Please Login or Register  to view this content.
    This works perfectly, thank you!

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UserForm automatic email with voting options???

    Between the link i provided in post #2 and
    this website http://www.rondebruin.nl/win/s1/outlook/mail.htm

    you will have all reading information to learn what you need

    i put the basis of the code for in your sample file
    replace to what you need

    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: UserForm automatic email with voting options???

    Thank you for this. Although I greatly Appreciate your help with this, getting the body of the email to show what was written in the UserForm was probably the hardest thing for me... Looked through that site and cannot seem to find anything to get me started, any clues?

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UserForm automatic email with voting options???

    i have no idea what you want as your body of email but to give you the idea on how to construct it
    here is a sample 2 line message using form controls

    Please Login or Register  to view this content.

    essentially
    vbnewline is to give you new line
    name of Control.text will give you the text value of the control
    ie nametxt.Text give you whatever is put in nametxt

  11. #11
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: UserForm automatic email with voting options???

    Thank you, this is perfect! I have used the code below!

    Thanks for your help

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Thumbs up Re: UserForm automatic email with voting options???

    Thank you, this is perfect! I have used the code below!

    Thanks for your help

    Please Login or Register  to view this content.

  13. #13
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UserForm automatic email with voting options???

    i dont think you need to type the full name in your case but whatever works for you

    just one last thing since i got you

    as we read left to right...reading at the beginning the prefix of the control (as opposed to the suffix which you are using) immediately lets me know what type of control your dealing with
    while it works either way, its just a normal convention many people adopt.
    what i mean is instead of nametxt using txtname or datetxt using txtdate

    It was kind of weird for me to read it as suffix instead of prefix

    anyway glad to help

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  14. #14
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: UserForm automatic email with voting options???

    I see what you mean, having now changed then round it makes sense, thanks for the advise!

+ 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. Voting in outlook by clicking on picture in the email body
    By rajesh.pardhe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2015, 09:02 AM
  2. Voting Options in mail
    By factory in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-28-2014, 09:42 AM
  3. Issue with Custom Voting options
    By humacdeep in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 03-19-2012, 06:29 PM

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