Consulting

Results 1 to 2 of 2

Thread: Form, listbox and multilines problem

  1. #1

    Thumbs down Form, listbox and multilines problem

    Dear all,

    I have the following problem. I created a form in Excel with a listbox, multiline select. When opening the form this executes a loop for writing the selected entries of the listbox to a range of cells in sheet 1

    Dim lItem As Long
    For lItem = 0 To lsboxMainframe.ListCount - 1
    If lsboxMainframe.Selected(lItem) = True Then
    Sheet1.Range("B60").End(xlUp)(2, 1) = lsboxMainframe.List(lItem)
    lsboxMainframe.Selected(lItem) = False
    End If


    The problem:
    When I open the document it should show the selected items of the listbox......so it should read the written items in the cells....

    Well....how the h*ll should I do this.....I haven't got any clue....I did this for a textbox...but this is simple....on opening the form...

    Worksheets("Detailsheet").Range("E15") = DRPC.txtNamebsd.Value
    Can anyone help me out here....??????

    Thanx for the effort
    Ben

  2. #2
    It's not clear what you want.
    You say that, upon opening the form, a code runs that writes the selected elements of a listbox to a series of cells. Upon opening the form, the listbox should be empty, i.e. no elements selected. So what is this code about?

    Now, let's say the selected items are written to the series of cells. (I assume they are saved before closing the document.) And upon re-opening the document you want the data to be shown... but they are there in the cells... so what should be shown and where?

    If you could upload a sample workbook, that would make this a lot easier to grasp.

    Jimmy
    -------------------------------------------------
    The more details you give, the easier it is to understand your question. Don't save the effort, tell us twice rather than not at all. The amount of info you give strongly influences the quality of answer, and also how fast you get it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •