+ Reply to Thread
Results 1 to 2 of 2

How to generate a new form according to items in listbox

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    美国
    MS-Off Ver
    Excel 2011
    Posts
    1

    Question How to generate a new form according to items in listbox

    I'm creating a program that generate new form using userform.
    So basically there are two list box, the first has all column titles and second is selected column titles. Between those two list boxes are two buttons: add and delete.
    The above works fine, but I have one last step to define the button to generate new form.

    The idea is that once the user clicks the button, it will generate new forms according to the selected column titles.
    My logic is that find the listbox item matches to the form cell, copy the entire column below and paste to the new sheet.

    The following are my code, which can't compile..

    Please Login or Register  to view this content.
    // SelectedC is the 2nd list box name.

    Someone help me please!

    Thank you very much for your help!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: How to generate a new form according to items in listbox

    If you want to create a separate sheet for each selected value, try:

    Please Login or Register  to view this content.
    If you want all the columns on one new sheet, try
    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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. [SOLVED] Form items chosen in Listbox to populate specific cells in spreadsheet
    By floydian in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2013, 07:48 AM
  2. [SOLVED] Auto select items in a Listbox with items from another Listbox
    By perducci in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-22-2013, 04:45 PM
  3. Editing listbox items in Dblclick event freezes Excel unless mouse moves over listbox
    By muneebmansoor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-28-2013, 02:21 PM
  4. Transfer random listbox items to new listbox and then loop through selected items
    By narrowgate88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2013, 05:58 PM
  5. Check if 2 consecutive Form listbox items selected
    By Foreverlearning in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-24-2012, 07:55 PM

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