|
-
Jun 12th, 2000, 08:26 PM
#13
_______
Captain Morgan Is Fine
'this is all you get..it works for me...
'couldn't do it last night..the woman was
' playing checkers with the daughter in law
'new project
'listbox called List1
'Command button called Command1
'file on your C drive call ANEW.txt containing your information
' CLN-Auto Cleanup on 19990512
' EXPIRE-DAV37000
' ADD-renee123:213/sVit3XRH2|renee123:00000:19901201:20031231:00
Option Explicit
Option Compare Text
Private Sub Command1_Click()
Dim myVariable
Dim SearchString, SearchChar, MyPos
Dim sCount As Integer
Dim iArray()
Open "C:\anew.txt" For Input As #1
Do While Not EOF(1)
sCount = sCount + 1
Line Input #1, myVariable
ReDim iArray(1 To sCount)
If Left(myVariable, 3) = "ADD" Then
SearchString = myVariable ' String to search in.
SearchChar = "|" ' Search
MyPos = InStr(1, SearchString, SearchChar, 1)
SearchString = Left(SearchString, (MyPos - 1))
MyPos = InStr(1, SearchString, SearchChar, 1)
Dim sLen As Integer
sLen = Len(myVariable)
Dim nLen As Integer
nLen = Len(SearchString)
myVariable = Right(SearchString, (nLen - 4))
End If
If Left(myVariable, 3) = "CLN" Or Left(myVariable, 6) = "EXPIRE" Then myVariable = "kill"
iArray(sCount) = myVariable
If myVariable <> "kill" Then
'here you can write it to a different file if you like or whatever
'the list box just shows you what you get
List1.AddItem iArray(sCount)
End If
Loop
Close #1
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|