Basically my code is doing what I want it too, except for one small thing, it is adding one to many of something at the end of a combo box.
As you can see by the code below, it is reading from approved.txt and populating a combo box with the entries it finds, the approved.txt file contains one entry per line of domain names and I need them to be just the yahoo.com part of for instance because I plan to add a url filter, but that is another story. So when this code is run, it produces a combo box like this:
Notice the extra
at the end? Well I want it to vanish.
-------------------------------------------------------------------------
-------------------------------------------------------------------------
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
- Albert Einstein (1879-1955)
As you can see by the code below, it is reading from approved.txt and populating a combo box with the entries it finds, the approved.txt file contains one entry per line of domain names and I need them to be just the yahoo.com part of for instance because I plan to add a url filter, but that is another story. So when this code is run, it produces a combo box like this:
Notice the extra
Code:
[URL unfurl="true"]http://www.[/URL]
Code:
Private Sub Form_Load()
Code:
Dim result As Long, intFreeFile As Integer, sText As String, txt As String, inp_String As Integer, UrlLead As String
Code:
UrlLead = "[URL unfurl="true"]http://www."[/URL]
Code:
Combo1.Width = Me.ScaleWidth
Code:
result = SetWindowPos(frmMain.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
Code:
App.TaskVisible = False
Code:
Load_Ban
Code:
On Error Resume Next
Code:
intFreeFile = FreeFile
Code:
Open App.Path & "\approved.txt" For Binary Access Read As #intFreeFile
Code:
Do Until EOF(intFreeFile)
Code:
Line Input #intFreeFile, txt
Code:
txt = UrlLead + txt
Code:
Combo1.AddItem txt
Code:
txt = vbNullString
Code:
Loop
Code:
Close #intFreeFile
Code:
End Sub
-------------------------------------------------------------------------
-------------------------------------------------------------------------
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
- Albert Einstein (1879-1955)