|
-
Apr 8th, 2001, 09:25 PM
#1
Thread Starter
PowerPoster
What wrong with this it's supposed to write to text file but it doesn't? Why?
Private Sub Command5_Click()
selct
copy
pste
Dim objSearch As Collection
Dim varSearch As Variant
Dim intPos As Integer
Set objSearch = New Collection
objSearch.Add "mining"
objSearch.Add "aurora"
objSearch.Add "ccc"
intPos = 0
For Each varSearch In objSearch
intPos = InStr(1, Text1.Text, varSearch)
If intPos > 0 Then
MsgBox varSearch & " was found in (" & _
Text1.Text & ") at position " & intPos
this part
Open "C:\File.txt" For Append As #1
Print varSearch & " was found in (" & _
Text1.Text & ") at position " & intPos
Close #1
nextsite
MsgBox "no results"
nextsite
End If
Next
End Sub
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
|