Outputting to a Listbox

Hi;

I have a list of data, and need for values outside a lower and upper bound to be flagged up to the user. I was thinking of outputting to a listbox, but cant get the code to work. I was wondering if anyone had any ideas for possible code, or a better way of outputting to the user.

Ryan




Answer this question

Outputting to a Listbox

  • Grant McElroy

    Hi,

    You real need to provide more detail.

    Where is the list of data in cells maybe or a control on a userform.
    What code do you currently have


  • 2006

    Thank you, have you got any idea of the code needed to clear the ListBox when UserForm closes

  • AshishGupta

    No.

    I suggest you start a new thread for that question.


  • Yogendran

    This will output the cells that contain values.
    It will also store the cell address in a second hidden column in cause you want to do something with item in the list. I you only need to list values comment out code.

    Dim rngTemp As Range
    Dim FinalRow As Long

    FinalRow = Range("A65536").End(xlUp).Row

    ListBox1.ColumnCount = 2 ' to hold cell address
    ListBox1.ColumnWidths = ";0" ' hide column

    For Each rngTemp In Range("H2:H" & FinalRow)
    If Len(rngTemp.Value) > 0 Then
    ListBox1.AddItem rngTemp.Value
    ListBox1.List(ListBox1.ListCount - 1, 1) = rngTemp.Address ' store address
    End If
    Next



  • ajaimes

    To clear the contents of the listbox use
    Listbox1.Clear

    Unloading the userform should do this automatically.


  • Simone1

    My list is in H2:H" & FinalRow & "

    where FinalRow is defined as

    FinalRow = Range("A65536").End(xlUp).Row

    The only problem, my list has empty slots. As in i only want cells with values in to be outputted to the listbox.



  • kevin_i_orourke

    do you have any code for working out the confidence interval for the mean for a specified alpha

  • Outputting to a Listbox