Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21911

Contents of Txt file placed in a BAS file instead

$
0
0
I have a text file that contains hundreds of website search engine strings e.g.
Code:

https://www.google.com.au/search?
This information is kept in a text file and the text file is distributed with the application. How can I add the search engines to a BAS file and call apon the BAS file instead?

Text file:

Code:

    Gov.Clear
    Dim intFree, X As Integer
    X = 1
    intFree = FreeFile
    Open App.Path & "\abc.txt" For Input As #intFree
        Do Until EOF(intFree)
            Input #intFree, mstrName(X), mstrSite(X), mstrAdd(X)
            X = X + 1
        Loop
    Close
    For X = 1 To UBound(mstrName)
        If mstrName(X) <> "" Then
            Gov.AddItem (Format(X, "00") & " - " & mstrName(X))
        End If
    Next X
   
    cboSite.ListIndex = 0

I wanted to bundle the text file into the BAS file and load the BAS file with the application.

Thank you.

Viewing all articles
Browse latest Browse all 21911


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>