techissue2008
Board Regular
- Joined
- Jun 13, 2008
- Messages
- 80
Hi
This thread was I posted:
http://www.mrexcel.com/forum/newreply.php?do=newreply&noquote=1&p=1602161
Why the combo cannot show the value and it is empty?
Any advice?
This thread was I posted:
http://www.mrexcel.com/forum/newreply.php?do=newreply&noquote=1&p=1602161
Code:
Private Sub Worksheet_Activate()
Sheets("Sheet1").Combo1.Clear
On Error Resume Next
Dim s As New Collection, arr, rng As Range
Dim a As Integer
Dim i As Integer
a = Sheets("Sheet2").[K65536].End(xlUp).row
For Each rng In Sheets("Sheet2").Range("K1:K" & K)
If rng <> "" Then s.Add rng, CStr(rng)
Next
ReDim arr(1 To s.Count)
For i = 1 To s.Count
arr(i) = s(i)
Next
Combo1.List = arr
Combo1.ListIndex = 0
End Sub
Why the combo cannot show the value and it is empty?
Any advice?