Results 1 to 10 of 10

Thread: VB6 and ini file (RESOLVED)

Threaded View

  1. #1

    Thread Starter
    Frenzied Member Robbo's Avatar
    Join Date
    Jan 2001
    Location
    Bradford
    Posts
    1,143

    Resolved 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
    Last edited by Robbo; Mar 18th, 2005 at 05:34 AM.
    -----------------------------------------------
    "The hall is rented,"
    "the orchestra is engaged,"
    "its now time to see if you can dance!"
    Q, Q-Who, Star Trek The Next Generation
    -----------------------------------------------
    General Work day

    -----------------------------------------------
    DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width