+ Reply to Thread
Results 1 to 6 of 6

Copy & Paste combobox value between userforms

  1. #1
    Registered User
    Join Date
    08-16-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    16

    Question Copy & Paste combobox value between userforms

    Hi All,

    Heres the scenario...

    form1 has a combobox (partnumber) with a vlookup function... If the partnumber has zero quantity then user then opens form2 via command button to add quantity to that partnumber.

    My question is: What is the code for copying the combobox1 value from form1 over to combobox2 in form 2?

    I can attach the file if needed?

    Thanks in advance

    Vaughan

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,945

    Re: Copy & Paste combobox value between userforms

    If you attach the file it will make it easier to provide the solution.

    BSB

  3. #3
    Registered User
    Join Date
    08-16-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    16

    Re: Copy & Paste combobox value between userforms

    Hi again,

    Unable to attach file.. Manage uploads page appears and hangs when trying to upload???

    Have uploaded here if needed.. http://s000.tinyupload.com/index.php...22988317295392


    Thanks

  4. #4
    Registered User
    Join Date
    08-16-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    16

    Re: Copy & Paste combobox value between userforms

    You will see when you open the file that there are 2 command buttons on the frmInventory. 'Add to Stock' and 'Remove from Stock' ... both these trigger new forms to open.. frmAdd & frmRemove

    If the user has taken the time to already search the inventory I would like to bring the value of cboPartNumber from frmInventory over the which ever form opens.. Either frmAdd or frmRemove. The combobox's are called cboPartNumberAdd and cboPartNumberRemove (I think)

    Thanks again

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,945

    Re: Copy & Paste combobox value between userforms

    I think this is what you're after. If not, let me know and I'll have another look.

    I've added a line of code to Module1 that sets the contents of the item number box to a variable and this variable is updated whenever the item number box is changed.
    Then the initialize event of each of the add & remove userforms applies that variable to the relevant combobox.

    Hope that helps.

    BSB
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-16-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    16

    Cool Re: Copy & Paste combobox value between userforms

    Many Many Many Thanks BadlySpelledBuoy !!!

    SOLVED !!!

    Cheers,
    Vaughan

+ 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. Macro to copy and paste a range of cells based on ComboBox selection
    By Paul103 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-07-2015, 03:21 PM
  2. [SOLVED] VBA to Lookup, Copy Row Data and Paste in a Column omitting blanks with ComboBox
    By Paul103 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2015, 09:18 PM
  3. Copy and paste entire row based on value entered into combobox by various users
    By dogl8629 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2013, 12:04 PM
  4. VBA Code to copy and paste a row depending on selection made in a combobox
    By ssu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-20-2013, 05:37 AM
  5. Userforms - display as a percentage from a Combobox
    By Spandex in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-23-2012, 05:59 AM
  6. Userforms / Combobox
    By chuggins143 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 04-02-2010, 04:25 AM
  7. Copy and Paste to Worksheet using Combobox (ActiveX)
    By okriskao in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-23-2009, 09:23 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