Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-09-2006, 03:27 PM   #1
More Booze
Confirmed User
 
Join Date: Mar 2004
Posts: 5,116
Visual Basic help needed!

Code:
Open "c:\stuff\content.txt" For Input As #1
   Do

        Input #1, texten
        If texten <> "" Then
            
            List1.AddItem texten
        End If
    Loop Until EOF(1)
    
Close #1
The problem is that each time the textline contains a comma "," it adds a new line to the listbox. I tried to fix it with this code.

Code:
texten = Replace(texten, Chr(44), "hahaha44")  <-- (special HTML chr for comma.)
But it doesn't work. How do I solve this?
More Booze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2006, 03:52 PM   #2
More Booze
Confirmed User
 
Join Date: Mar 2004
Posts: 5,116
*bump*****
More Booze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2006, 04:00 PM   #3
SilverTab
Confirmed User
 
Join Date: Nov 2001
Location: MTL
Posts: 5,060
huh weird! I wonder why a coma is causing a new line??

BTW im not that familiar with vb but is:
Input #1, texten

the same as

Line Input #1, texten???

Line input should grab all the text untill it meets a linefeed...so coma shoulnt be a prob?... I dunno...
__________________
mmm my sig was too big... no more cool animation
but hey still! need php? ICQ: 94586959
SilverTab is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2006, 04:03 PM   #4
More Booze
Confirmed User
 
Join Date: Mar 2004
Posts: 5,116
Hey! I just changed it to
Line Input #1, texten
and it worked! Thanks! :-)
More Booze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2006, 04:15 PM   #5
SilverTab
Confirmed User
 
Join Date: Nov 2001
Location: MTL
Posts: 5,060
no prob


glad I could help ;)
__________________
mmm my sig was too big... no more cool animation
but hey still! need php? ICQ: 94586959
SilverTab is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2006, 05:08 PM   #6
Myst
Confirmed User
 
Join Date: Feb 2004
Location: Alberta, Canada
Posts: 4,707
Private Sub LoadContents(Lst As Object, sPath As String)
Dim iFN As Integer
Dim sEntry As String
Lst.Clear 'clear the list
iFN = FreeFile ' get a free filenumber
Open sPath For Input As iFN ' open the file
Do Until EOF(iFN) ' loop until end of file (EOF) reached
Line Input #iFN, sEntry ' get the next entry
Lst.AddItem sEntry ' add entry to the list
Loop
Close iFN ' close the file
End Sub
__________________
ICQ: 298-523-037
Myst is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.