|
-
Jun 4th, 2004, 10:57 AM
#1
Thread Starter
Addicted Member
Msgbox messages
Open "c:\Address.dat" For Input As #1
Do Until EOF(1)
i% = i% + 1
If Text1.Text = "" Then Exit Do
If i% > UBound(Names$) Then ReDim Preserve Names$(1 To i%)
If i% > UBound(Adds$) Then ReDim Preserve Adds$(1 To i%)
Input #1, Names$(i%), Adds$(i%)
If Text1.Text = Names$(i%) Then
Text1.Text = Names$(i%)
Text2.Text = Adds$(i%)
Else
msg = "NOT There"
response = MsgBox(msg, vbOKOnly, "Attention")
End If
Loop
Close #1
HERE I WOULD LIKE TO INFORM YOU THAT IF I DON' TYPE THE
NAME CORRECTLY OR NO NAME FOUND I WANT MSG TO BE
DISPLAYED HOW DO I DO IT WHEN I PRESS OK THE MSGBOX SHOULD DISAPPEAR
REGDS
SAM F
-
Jun 4th, 2004, 11:03 AM
#2
Frenzied Member
msgbox
??
Edited to add~~~~~~
Oh I see what you mean... You need to exit the loop in order for the message boxes to stop popping up when they click OK
VB Code:
Open "c:\Address.dat" For Input As #1
Do Until EOF(1)
i% = i% + 1
If Text1.Text = "" Then Exit Do
If i% > UBound(Names$) Then ReDim Preserve Names$(1 To i%)
If i% > UBound(Adds$) Then ReDim Preserve Adds$(1 To i%)
Input #1, Names$(i%), Adds$(i%)
If Text1.Text = Names$(i%) Then
Text1.Text = Names$(i%)
Text2.Text = Adds$(i%)
Else
msg = "NOT There"
response = MsgBox(msg, vbOKOnly, "Attention")
Exit Sub
End If
Loop
Close #1
Last edited by Spajeoly; Jun 4th, 2004 at 11:09 AM.
-
Jun 5th, 2004, 02:04 PM
#3
Frenzied Member
VB Code:
Open "c:\Address.dat" For Input As #1
Do Until EOF(1)
i% = i% + 1
If Text1.Text = "" Then Exit Do
If i% > UBound(Names$) Then ReDim Preserve Names$(1 To i%)
If i% > UBound(Adds$) Then ReDim Preserve Adds$(1 To i%)
Input #1, Names$(i%), Adds$(i%)
If Text1.Text = Names$(i%) Then
Text1.Text = Names$(i%)
Text2.Text = Adds$(i%)
Else
msg = "NOT There"
MsgBox "NOT There" vbOKOnly, "Attention"
Close #1
Exit Sub
End If
Loop
Close #1
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
|