+ Reply to Thread
Results 1 to 7 of 7

Refresh UserForm after entering data in another userform

  1. #1
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Refresh UserForm after entering data in another userform

    VBA Experts,

    I have two userforms setup in my sample workbook - Invoice Form (main userform) and AddCompany Userform. I have a button in the Invoice Form that calls the AddCompany Userform if the user wants to add a new company. Once the user adds a new company, I would like the Invoice Form to list the new company name and have the newest company selected in the in the Company drop down list of the Invoice Form. I have attached a sample workbook for you all to see. Please let me know if there is a way to get this done.

    Thank you in advance for your help.

    J
    Attached Files Attached Files

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    2016 Win10
    Posts
    7,149

    Re: Refresh UserForm after entering data in another userform

    I'd do it like this:

    comapny Add Form
    Please Login or Register  to view this content.
    Then main form
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Refresh UserForm after entering data in another userform

    Hi Kyle,
    Thank you for the quick reply. The code looks great but was just wondering if there was a way to automatically select the newest company from the drop down list (companyList) in the main form. Please let me know!

    Thank you!

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    2016 Win10
    Posts
    7,149

    Re: Refresh UserForm after entering data in another userform

    sure:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Refresh UserForm after entering data in another userform

    That works!!!! Thank you so much!

  6. #6
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Refresh UserForm after entering data in another userform

    Hi Kyle,

    I know I marked this as Solved and I might be breaking the rules here but how do you sort the drop down list once it gets added? I noticed it just drops the new company to the bottom of the list instead of sorting it when you select the drop down. Is there a way to sort?

    Thank you again!!

  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    2016 Win10
    Posts
    7,149

    Re: Refresh UserForm after entering data in another userform

    Possibly:
    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. Need help entering in data from userform
    By adamjohnson182 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2013, 08:15 PM
  2. [SOLVED] UserForm not entering data in to spreadsheet
    By LoneWolf3574 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-29-2012, 07:58 AM
  3. [SOLVED] Entering UserForm Data Into a Worksheet
    By dizzygirl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2012, 05:29 AM
  4. Entering data from a Userform into a row
    By dougwild in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-18-2012, 10:52 AM

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