+ Reply to Thread
Results 1 to 6 of 6

Transfer Item From Range1 to Range2 Using ListBox

  1. #1
    Registered User
    Join Date
    03-27-2009
    Location
    Surat,India
    MS-Off Ver
    Excel 2007
    Posts
    52

    Transfer Item From Range1 to Range2 Using ListBox

    Dear All,

    I Have A 2 Range Named Range1 & Range2 and 2ListBox Named ListBox1 & ListBox2 in Userform1.

    Please Login or Register  to view this content.
    Now I Want to transfer items from Range1 to Range2 or viceversa usiing ListBox. Please help me to codify this.

    Example file will be a better soultion.

    Regards,
    Vishnu
    Last edited by hifliers; 05-22-2009 at 04:43 AM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Transfer Item From Range1 to Range2 Using ListBox

    Hi, As it is not clear where "Range1" and "Range2" are I have Based this on the Ranges in Columns "A" & "B". When you have got it working change the related Addresses to suit your ranges.
    If you Show the Userform In "Edit Mode" then Double click on the Userform. You Can paste the entire Codes Below into that Module.
    When you select an Item in Either ListBox, it will be deleted from its related range and Listbox and insert in the Other Range and ListBox.
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Registered User
    Join Date
    03-27-2009
    Location
    Surat,India
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Transfer Item From Range1 to Range2 Using ListBox

    Dear Mickg,

    Thanks fo it! It's working me. If I want to use for Multi Column List Box then How to use it.

    Regards,

    Vishnu

  4. #4
    Registered User
    Join Date
    03-27-2009
    Location
    Surat,India
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Transfer Item From Range1 to Range2 Using ListBox

    Again Some Problems.

    How to use column headings? And I am not able to transfer all items from Range1 to Range2. At least 2 item should be there in both the ranges to run the code. Please resolve this issue.

    Regards,

    Vishnu

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Transfer Item From Range1 to Range2 Using ListBox

    hifliers please wrap all code with code tags.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Transfer Item From Range1 to Range2 Using ListBox

    Here is a bunch of code on moving items around and between listboxes,
    http://www.andypope.info/vba/listboxmover.htm

    It will not work if the listboxes are populated using rowsource.

    Listbox heading only appear when using rowsource. The row immediately above the defined range will be used for heading labels.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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