Private Sub CommandButton1_Click() Dim A(20), Sum As Integer Sum = 0 For i = 1 To 20 A(i) = Int(Rnd * 20) If A(i) > 3 Then Sum = Sum + A(i) TextBox1.Text = TextBox1.Text & A(i) & " " TextBox2.Text = Sum Next i If TextBox1.Text <> "" Then CommandButton1.Enabled = False CommandButton2.Enabled = True End If End Sub
Private Sub CommandButton2_Click() If TextBox1.Text <> "" Then CommandButton1.Enabled = True TextBox1.Text = "" TextBox2.Text = "" CommandButton2.Enabled = False End Sub
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку