View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Axel Axel is offline
external usenet poster
 
Posts: 40
Default Get range in list from combobox value


Thanks for answer!
I am still struggle with this.
am not sure that I dim the code correct.
Private Sub ComboBox1_Change()
Dim ws As Integer
Dim cell As range
For ws = 1 To Sheets.Count
ComboBox1.AddItem Sheets(ws).Name
Next
'ws returns sheet count? Combo returns sheet name?
ws = ComboBox1.Text
With Sheets(ws)
For Each cell In .range("B2:B50")

lbAvailableItems.AddItem cell
Next cell
End With
End Sub

Any suggestion?

*** Sent via Developersdex http://www.developersdex.com ***