but i need a management feature on it which allows you to enter a password and it allows you to edit item descriptions. ive got the password bit working im just strugling on how to edit a .txt file from inside the form
Private Sub cmdI1_Click()
Dim tmp As String
Dim item1 As String
Open "I:\item1.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item1 = item1 + tmp & vbNewLine
Wend
Close #1
MsgBox item1
End Sub
Private Sub cmdI10_Click()
Dim tmp As String
Dim item10 As String
Open "I:\item10.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item10 = item10 + tmp & vbNewLine
Wend
Close #1
MsgBox item10
End Sub
Private Sub cmdI2_Click()
Dim tmp As String
Dim item2 As String
Open "I:\item2.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item2 = item2 + tmp & vbNewLine
Wend
Close #1
MsgBox item2
End Sub
Private Sub cmdI3_Click()
Dim tmp As String
Dim item3 As String
Open "I:\item3.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item3 = item3 + tmp & vbNewLine
Wend
Close #1
MsgBox item3
End Sub
Private Sub cmdI4_Click()
Dim tmp As String
Dim item4 As String
Open "I:\item4.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item4 = item4 + tmp & vbNewLine
Wend
Close #1
MsgBox item4
End Sub
Private Sub cmdI5_Click()
Dim tmp As String
Dim item5 As String
Open "I:\item5.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item5 = item5 + tmp & vbNewLine
Wend
Close #1
MsgBox item5
End Sub
Private Sub cmdI6_Click()
Dim tmp As String
Dim item6 As String
Open "I:\item6.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item6 = item6 + tmp & vbNewLine
Wend
Close #1
MsgBox item6
End Sub
Private Sub cmdI7_Click()
Dim tmp As String
Dim item7 As String
Open "I:\item7.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item7 = item7 + tmp & vbNewLine
Wend
Close #1
MsgBox item7
End Sub
Private Sub cmdI8_Click()
Dim tmp As String
Dim item8 As String
Open "I:\item8.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item8 = item8 + tmp & vbNewLine
Wend
Close #1
MsgBox item8
End Sub
Private Sub cmdI9_Click()
Dim tmp As String
Dim item9 As String
Open "I:\item9.txt" For Input As #1
While EOF(1) = 0
Line Input #1, tmp
item9 = item9 + tmp & vbNewLine
Wend
Close #1
MsgBox item9
End Sub
Private Sub cmdSecurity_Click()
Dim password As Integer
Dim pass As Integer
password = 1234
pass = 0
pass = InputBox("enter password", "password")
Do
If pass <> password Then
MsgBox ("incorrect password")
pass = InputBox("enter password", "password")
End If
Loop While pass <> password
Do
If pass = password Then
End Sub

New Topic/Question
Reply




MultiQuote




|