Results 1 to 4 of 4

Userform One or more options listbox? combobox?

Threaded View

  1. #1
    Registered User
    Join Date
    02-20-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    92

    Userform One or more options listbox? combobox?

    Hello,

    I am trying to figure out the best way to allow users to select 1-4 options and have the spreadsheet react according to the selections. Assume I have a main spreadsheet which will grab data from between 1-4 spreadsheets. I want a userform or some other method where users can indicate how many and which sheets to import data from.

    I've gotten a little confused by some of the wording I've seen online. Can someone explain what a combo box is? Or a listbox?

    Also, I've looked into putting checkboxes or option buttons into a userform, but each option leads to its own private sub. It doesn't easily allow for combinations. I can provide more info or an example sheet, but I think I have represented the idea and someone will probably be able to help. Thank you so much for the help or ideas you can provide.

    I've decided to add some basic code which may help to illustrate what I mean. Assume the below is for the user to indicate only Spreadsheet 1 (of the 4). The spreadsheets are in the same location and I would like the below code to play out for any combination of the 1-4 spreadsheets chosen.

     Workbooks.Open Filename:= _
            "C:\temp\Spreadsheet1.xls"
    
        Range("A2:E2").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        Windows("Main.xls").Activate
        Sheets("Spreadsheet 1").Select
        Range("A2").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("A2").Select
    Last edited by starcraftbud; 08-25-2010 at 03:44 PM.

Thread Information

Users Browsing this Thread

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

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