+ Reply to Thread
Results 1 to 9 of 9

comboboxes in userform, submit buttons opens outlook.

  1. #1
    Registered User
    Join Date
    10-04-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    26

    comboboxes in userform, submit buttons opens outlook.

    Hi, I created this userform and looking to make a few changes to it. The checkboxes you will notice in the attached file I want to replace with comboboxes with the same labels. I tried several different options but it didn't work.

    Also, is there way so when the submit buttom is clicked, it opens microsoft outlook and the information submitted would be transferred in an email? Any help, suggestions would be highly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: comboboxes in userform, submit buttons opens outlook.

    Hello Jcanguy,

    I removed the check boxes and added three combo boxes: PreAnalytical, Analytical, and PostAnalytical. These controls have their RowSource properties set to named ranges on the "Types of errors" worksheet. The ranges are dynamic. That is the range address will automatically adjust when data is added or removed.

    I assumed there would be one type of error and error description entered on the worksheet. When a choice is made in a combo box, the others are cleared. The error type and description are saved in the variables ErrorType and ErrorDesc.

    No code has been added to launch Outlook. You didn't say what data you want sent in the email, nor who the recipient will be, or how the body of the email be formatted. Once that is known, the code can added. Have a look at the attached workbook and let me know if this close to what you want.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: comboboxes in userform, submit buttons opens outlook.

    Check out excels help file on ComboBoxes as well

    A code is supplied there to populate a ComboBox,


    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-04-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: comboboxes in userform, submit buttons opens outlook.

    Leith,

    Here are the changes I made. In regards to the email, I'm hoping there is a code that would automatically open Outlook on the machine been used, so that the user can enter the "To" email address. The subject line, should always be "A PIR has been submitted to you". This sounds so ideal, I'm not even sure its possible.
    Attached Files Attached Files

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: comboboxes in userform, submit buttons opens outlook.

    Hello Jcanguy,

    You made some changes to the user form and two of the Combo Boxes names changed. I made the corrections. It should work correctly now. See the attached workbook.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-04-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: comboboxes in userform, submit buttons opens outlook.

    Leith,
    Thanks very much for your help. It appears there are still some errors when I hit the submit button. The error seems to be pointing to the submit and outcome textline, even though those are corrected. Were you able to submit the information without any problems?

    Thanks again,
    jcanguy

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: comboboxes in userform, submit buttons opens outlook.

    Hello Jcanguy,

    The error occurs when writing to column "H". This text box txtOutcome is not on the user form. I don't see anything else on the form that might relate to this. What do you want to do with this missing text?

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: comboboxes in userform, submit buttons opens outlook.

    Hello Jcanguy,

    This version simply ignores the errors created by text boxes that do not exist. The information transfers from the user form to the worksheet now. Please check it for accuracy.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-04-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    26

    <Solved> comboboxes in userform, submit buttons opens outlook.

    <Solved>Thanks! it works amazing!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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