Quantcast
Channel: Ru.Board
Viewing all articles
Browse latest Browse all 1005198

Excel VBA (часть 3) (3060) / все вопросы по Excel VBA сюда..

$
0
0
andrewkard1980:
umka777_89
Пробуйте как то так:

Код:
Private Sub UserForm_Initialize()
ComboBox1.AddItem Worksheets(1).Cells(1, 1)
End Sub
Private Sub ComboBox1_Change()
Dim i&, iRws&
Set sn = Worksheets(1)
iRws = sn.Cells(Rows.Count, "A").End(xlUp).Row

For i = 1 To iRws
If sn.[B100] Like "*" & sn.Cells(i, 1) & "*" Then
ComboBox1.AddItem sn.Cells(i, 1)
End If
Next i

For i = ComboBox1.ListCount To 2 Step -1
If ComboBox1.List(i - 1) = ComboBox1.List(i - 2) Then
ComboBox1.RemoveItem (i - 1)
End If
Next i
Set sn = Nothing
End Sub

Viewing all articles
Browse latest Browse all 1005198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>