VB6 and ini file (RESOLVED)
heres what i have
in ini file
[email protected];
[email protected];
[email protected];
my program opens and counts the number of entrys ive got
<VBCODE>Private Sub cmdEmail_Click()
'************* open emails from file***********
Dim strEmailfile As String
Dim intFreeFile As Integer
Dim strEmails As String ' Read in
strEmailfile = App.Path & "\emails.ini"
'S:\Disaster Recovery\VB Program Backup\SBO Comm V1.7
'MsgBox (strEmailfile)
intFreeFile = FreeFile
On Error GoTo FinishCheck
Open strEmailfile For Input As #intFreeFile
Do While Not EOF(intFreeFile)
Line Input #intFreeFile, strEmails
intEmailCount = intEmailCount + 1
Loop
Close #intFreeFile
MsgBox ("Email Count = " & intEmailCount)
FinishCheck:
End Sub</VBCODE>
i want to modify this so it checks the entrys and only allows one, (so no dupicates), unsure of the best way to do this, but please keep this simple, dont want to be adding components and references, or any databases
ok thanks for your help in advance