+ Reply to Thread
Results 1 to 8 of 8

userform listbox

Hybrid View

Zrx userform listbox 11-22-2006, 06:27 PM
davesexcel Try this code: Private... 11-22-2006, 06:58 PM
lrhodes shoot this is what I needed... 11-22-2006, 07:04 PM
Zrx This is confusing me... 11-22-2006, 08:00 PM
davesexcel Using an Array to Populate... 11-22-2006, 08:22 PM
Zrx listbox 11-22-2006, 08:50 PM
davesexcel Okay, I think I am getting... 11-22-2006, 09:54 PM
heinousanus Thankyou for this! I... 11-22-2006, 08:16 PM
  1. #1
    Registered User
    Join Date
    11-22-2006
    Posts
    80
    This is confusing me somewhat, sorry.

    ListItems = Range("yourRangeName").Value

    Does this mean I need to have my "range names" in a "range" itself as to pick up for listbox??

    I have 52 range names for the weeks of the year. Example Wk1_Jan_07,Wk2_Jan_07 and so on. These are names of ranges 15 rows high 12 columns wide.

    The listbox will allow you to choose a week then I assume case statement will allow choice to be run afterwords (working on this code therory).

    Also, this line in second sub "Private Sub UserForm1_Initialize()" gives me an ambiguous name detected: userform1_initialize error?
    Last edited by Zrx; 11-22-2006 at 08:16 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Using an Array to Populate the ListBox

    Here is microsofts help support site that shows how to populate a listbox using multiple ranges

    http://support.microsoft.com/?kbid=161534

  3. #3
    Registered User
    Join Date
    11-22-2006
    Posts
    80

    listbox

    Thanks Dave,

    Beacuse of this line in the help file

    "The items in the ranges A1:A3 and C1:C3 on Sheet1 are read into an array and are then assigned to the list of ListBox1. "

    I will need to rethink my plan.

    As I said I don't need the "items" in the "range name" just want to use the range name as a "string" I guess so the case statements can pick from there and then the case will do the work for that picked "string".

    Ralph

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Okay, I think I am getting this....
    In your userform, you want to select a range from the list box for your calculations...........


    Or do you want to select a range from a list box and that selection populates another listbox??

    Quote Originally Posted by Zrx
    Thanks Dave,

    Beacuse of this line in the help file

    "The items in the ranges A1:A3 and C1:C3 on Sheet1 are read into an array and are then assigned to the list of ListBox1. "

    I will need to rethink my plan.

    As I said I don't need the "items" in the "range name" just want to use the range name as a "string" I guess so the case statements can pick from there and then the case will do the work for that picked "string".

    Ralph
    Last edited by davesexcel; 11-22-2006 at 10:04 PM.

+ Reply to Thread

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