+ Reply to Thread
Results 1 to 5 of 5

Userform Listbox to Change Quantity in Cell?

  1. #1
    Registered User
    Join Date
    08-01-2018
    Location
    Ann Arbor, MI
    MS-Off Ver
    2016
    Posts
    96

    Userform Listbox to Change Quantity in Cell?

    I currently have an order form (workbook A sheet 1) with a userform with listbox that allows me to take all of the necessary information filled out in the form and transfer it to a shipping form (workbook B sheet 1).
    What I would like to do is to change it such that a user can single-select the part they need, type in the quantity of which they are shipping it and click the button "add" where the userform clears and the user can add another part from the order to the shipping form. Then, there is another button located on the userform "done" that closes out the userform and saves and closes the shipping form with a unique title.

    I have most of the code figured out, besides transferring which parts get to transfer to the shipping form and their new quantities.

    I have uploaded the 2 workbooks in here, and the userform code can be seen below.

    Please Login or Register  to view this content.

    I appreciate any and all help!
    Attached Files Attached Files
    Last edited by whahmira; 08-15-2018 at 03:51 PM. Reason: code was incorrectly pasted

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Userform Listbox to Change Quantity in Cell?

    Never Ever change the default control names until you know a lot more.

    Please Login or Register  to view this content.



    Rule 1. Never Rename your controls, It makes Coding Harder


    Please Login or Register  to view this content.
    The above code enters the numbers 1 to 100 in textboxes 1 to 100
    How would you do that if each Textbox has a unique name?


    Rule 2. Number Each Control with the Column Number of its Source Data.


    Please Login or Register  to view this content.
    The above code loads Textboxes 1 to 100 with the data in row 1, columns 1 to 100



    Please Login or Register  to view this content.
    The above code Stores Textboxes 1 to 100 in row 1, columns 1 to 100


    Rule 3. You can have more than one control storing data to the same cell
    or
    reading data from the same cell

    That is not a problem. As long as they are not the same type of control.

    Eg. Textbox1, Combobox1, Label1 can all read / write to the same cell
    Attached Files Attached Files
    Last edited by mehmetcik; 08-15-2018 at 04:39 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    08-01-2018
    Location
    Ann Arbor, MI
    MS-Off Ver
    2016
    Posts
    96

    Re: Userform Listbox to Change Quantity in Cell?

    Hello mehmetcik,

    Thank you for your help! This does exactly what I was hoping for. I am sorry I am not very competent in vba yet, especially userforms, and I am only teaching myself.
    I really appreciate you helping me!

  4. #4
    Registered User
    Join Date
    08-01-2018
    Location
    Ann Arbor, MI
    MS-Off Ver
    2016
    Posts
    96

    Re: Userform Listbox to Change Quantity in Cell?

    One last question: is there a way that I can change this line
    Please Login or Register  to view this content.
    Such that it ignores the B column and only goes to the A and C columns? I tried replacing it with
    Please Login or Register  to view this content.
    But it then only lists the first column

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Userform Listbox to Change Quantity in Cell?

    Fastest way is to set the 2nd column with to 0

    Click on the userform Listbox so it opens the setting menu

    On column widths change 40pt:120pt;40pt to 40pt;0pt;40pt

+ 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. Userform or Pop Up Menu to Change Quantity in cell?
    By whahmira in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2018, 01:16 PM
  2. [SOLVED] How to update Userform listbox when cell values change
    By Zimmerman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2016, 01:05 PM
  3. Change userform listbox border with change event
    By EuclideanKraken in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2014, 05:34 PM
  4. [SOLVED] Change date in userform listbox to dd/mm/yyyy format
    By cath1509 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2013, 10:46 AM
  5. [SOLVED] UserForm - How To Make TextBox Value Change Depending On ListBox Selection
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2013, 05:05 PM
  6. gather information from different worksheets to a userform listbox and change it
    By ncaravela in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2013, 12:32 PM
  7. userform listbox
    By tsiguy96 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-14-2013, 11:09 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