hCORe писал(а):- Код: Выделить всё
'The helmsman used to stand by with tears in his eyes.
'He knew it was all wrong; but alas! Rule #42 of the Code:
' "No one shall speak to the man at the Helm" had been
'completed by Bellman himself with the words:
Вот я делаю так!
Private Sub Form_Load()
Const FINDSTR = Form1.Text1.Text
Dim ff As Byte, sData As String
ff = FreeFile
Open "C:\login.txt" For Input As #ff
sData = Input(LOF(ff), ff)
Close #ff
Dim arrStrs() As String
arrStrs = Split(sData, vbNewLine)
Dim i As Long, sOut As String
For i = 0 To UBound(arrStrs)
If Trim$(arrStrs(i)) <> FINDSTR Then
sOut = sOut & arrStrs(i) & vbNewLine
End If
Next
sOut = Mid$(sOut, 1, Len(sOut) - Len(vbNewLine))
ff = FreeFile
Open "C:\login.txt" For Output As #ff
Print #ff, sOut;
Close #ff
End Sub
Это все находится на форме №3 Эту форму я открываю путем нажатия на кнопку Form3.Show Т.е. чтобы введеный ник в тектовом поле на первой форме ну исчез!
При запуске формы №3 вылазит "CONSTANT EXPRESSION REQUIRED"