. .
, , Selected:
Option Base 1
Private Sub cmdOK_Click()
Dim As Integer
For i = 0 To lst.ListCount - 1
If lst.Selected(i) = True Then _
= + 1
Next i
MsgBox " " & & " !", _
vbInformation, ""
Unload Me
End Sub
:
1. frm__2_ cmdOK_Click.
2. cmd_Click.
(ComboBox)
, , :
: ( !) , , C:\St\.xls (. 10‑10):
1) :
cmdOK
cmd
cbo
2) frm.
, , :
Sub ()
' :
Dim () As String
Dim As String
Dim As Integer
Dim As Integer
Dim As Integer
'1. C:\St\.xls
Call ("C:\St\.xls")
If flag = 0 Then Exit Sub
'2.
Call ("")
If flag = 0 Then Exit Sub
'3. , _
:
= 3
Do While Trim(Cells(, 1).Value) <> ""
= + 1
Loop
= 1 '-
ReDim Preserve () As String
() = Trim(Cells(3, 1).Value)
For i = 3 To - 1
If Trim(Cells(i + 1, 1).Value) <> "" Then
= Trim(Cells(i + 1, 1).Value)
For j = 1 To
If = (j) Then GoTo n3
Next j
= + 1
ReDim Preserve () As String
() = Trim(Cells(i + 1, 1).Value)
End If
n3: Next i
'4. :
For i = 1 To - 1
= (i)
k = i
For j = i + 1 To
If (j) >= Then
Else
= (j)
(j) = (k)
(k) =
End If
Next
Next i
'5. :
frm.cbo .List =
frm.Show
End Sub
:
|
|
1. 10 .
2. frm / cmd, .
3. ().