Dim I As Long, fResult as Boolean
fResult = True
For I = 1 To 3
If Len(Trim$(Text1(I).Text) = 0 Then
fResult = False
Exit For
End If
Next I
Command1.Enabled = fResult
Private Sub Command1_Click()
For i = 0 To 3
If text1(i) = "" Then
knopka1 = MsgBox("Заполните поля", vbOKOnly + vbExclamation, "")
If knopka1 = vbOK Then
form.Show
End If
Exit For
Else
file = FreeFile
If qa Then
MsgBox "Изменения внесены", vbOKOnly, ""
Open "c:\testfile.txt" For Output As #file
For ii = 0 To 3
Print #file, text1(i).Text
Next
Close #file
Unload Me
Exit For
Else
MsgBox "Изменений нет", vbOKOnly, ""
Unload Me
Exit For
End If
End If
Next
End Sub
Сейчас этот форум просматривают: Yandex-бот и гости: 128