+ Reply to Thread
Results 1 to 2 of 2

Userforms - Populating a List box with Some List Items already selected

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Userforms - Populating a List box with Some List Items already selected

    Hi

    I am relatively new to excel vba programming and slowly getting the hang of it, learning as I go

    I have a macro that uses a userform with a listbox using fmMultiSelectMulti the macro all runs fine and does what I want.

    Due to nature of the project I have written (an estimating package) the macro may be run more than once and on the second and subsequent times i would like previously selected items to be shown as selected when the userform / listbox is re-initialized. Is this possible? has anyone any pointers?

    I am recording the original inputs on a spreadsheet .offset(0,8) from the source for the list box items.

    I guess what I am looking for is there a way to add a listitem with selected set to true if the value of .offset(0,8) meets a set criteria

    I have not attempted any code of this yet as I am really not sure where to start, any help suggetions gratefully received

  2. #2
    Registered User
    Join Date
    10-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Userforms - Populating a List box with Some List Items already selected

    Ok I decided I should have a go, and suprised myself by getting it to work, possibly not the best style but would appreciate comments on that. Obviously this is straight out of my application and therefore has application specific references, it's the last 6 lines that I added

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-21-2013
    Location
    Zagreb
    MS-Off Ver
    Excel 2007
    Posts
    3

    How to join two or more cell

    hi... i need help... i have two sheets and a lot row and column in each sheet..
    what i need to do, is in sheet1 join column E,H,I,J,K,L in column B. The same thing is with
    the sheet2..

    here is example but not working

    For Each c In wY.Range("B2") (wY is worksheet, c as range)
    wY.Range("B2", wY.Range("B" & Rows.Count).End(xlUp)).Value = Range("F2").Value & .Range("I2").Value & .Range("J2").Value
    Next c

+ 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