Dim ilem As Integer
Программный код для кнопки добавить:
Private Sub dobav_Click()
If nst.Text<>"" Then
Sp.AddItem nst.Text
stl(ilem)=nst.Text
ilem=ilem+1
If Len(maxl)<=Len(nst.Text) Then
maxl=nst.Text
End If
If Len(minl)>=Len(nst.Text) Then
minl=nst.Text
End If
nst.Text=""
max.Caption=maxl
min.Caption=minl
End If
Nst.SetFocus
End Sub
Программный код для кнопки удалить:
Private Sub udal_Click()
Dim i As Integer
For i=sp.ListIndex To 99
stl(i)=stl(i+1)
Next i
ilem=ilem-1
Sp.RemoveItem sp.ListIndex
tekstr.Caption=""