View Single Post
  #5   Report Post  
bach
 
Posts: n/a
Default


Hi,

Thanks for your help, I have got the following with errors lol


Code:
--------------------
Dim ws As Worksheet
Dim ListBoxArray As Variant

Set ws = Worksheets("Member_list")

With ws
If IsEmpty(.Range("A2")) Then
ElseIf IsEmpty(.Range("A3")) Then
ListBoxArray = Array(.Range("A2").Value)
Else
ListBoxArray = .Range(.Range("A2"), .Range("A2").End(xlDown)).Value
End If

End With


If IsArray(ListBoxArray) = False Then
Me.lblTotalNo.Caption = "There are no members currently in the database."
Me.lstMembers.Clear
Else
With Me.lstMembers
.Clear
.ColumnCount = 3
.ListFillRange = ""
For Each myCell In ListBoxArray.Cells
.AddItem myCell.Value
.List(.ListCount - 1, 1) = myCell.Offset(0, 2).Value
.List(.ListCount - 1, 2) = myCell.Offset(0, 3).Value
Next myCell
End With
End If
--------------------


doesnt like .listfillrange and mycell any ideas.


--
bach
------------------------------------------------------------------------
bach's Profile: http://www.excelforum.com/member.php...o&userid=26134
View this thread: http://www.excelforum.com/showthread...hreadid=468634