|
-
Nov 19th, 1999, 02:59 AM
#1
Thread Starter
Hyperactive Member
I found my problem. I am assigning text to a string variable. It seems that the string is not able to hold all the text. Is there a larger variable that can hold text the way I want?
code except:
Dim temp As String
Dim section(150) As String
Dim i, j, newfile As Integer
newfile = FreeFile
Open "c:\temp\999edcs.txt" For Input As newfile
While Not EOF(newfile)
Line Input #newfile, temp
If InStr(temp, ">") And InStr(temp, "<") Then
List1.AddItem (section(i))
i = i + 1
Else:
section(i) = section(i) & temp & vbCrLf
End If
Wend
For i = 0 To List1.ListCount - 1
List1.Selected(i) = True
Next i
Close newfile
Text1.Text = "edcs9999.txt"
------------------
I am so skeptacle, I can hardly believe it!
-
Nov 19th, 1999, 03:56 AM
#2
A variable Length String can hold Approx' 2 billion Bytes, so I doubt that's your problem.
Are you getting an Error?
What are you trying to do?
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Nov 19th, 1999, 04:09 AM
#3
Thread Starter
Hyperactive Member
I dont get an error. Does it matter that the variable is a string array?
my post contains what I am doing with the string variable. Do you think that the problem is when I assign the text to the list box? thank you for your time and have a good day
-
Nov 19th, 1999, 04:18 AM
#4
I've run your code with the Textfile you supplied and it works fine, it doesn't lose any data anywhere.
I think you're misinterpeting the Width of the Listbox as the end of the Sections Text.
Just because you can't see the full string in the Listbox, doesn't mean it's not there.
In your Loop, get Debug to Print Each Section No. and the Contents to check for yourself.
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Nov 19th, 1999, 04:23 AM
#5
Thread Starter
Hyperactive Member
I am an idiot! it was not the string but when I assign it to the list box. The listbox is responsible for trimming the text.
thank you for your time and have a good day
------------------
I am so skeptacle, I can hardly believe it!
-
Nov 19th, 1999, 04:35 AM
#6
Thread Starter
Hyperactive Member
Can the admin please delete this post I wish that I never started this thread
thank you
-
Nov 19th, 1999, 09:28 AM
#7
Hyperactive Member
1- Please don't feel shammy, (is it spelled that way?)- we all learn from every post
2- You can delete your post yourself, just click on "edit/delete" (that icon with a little pencil)
[This message has been edited by Juan Carlos Rey (edited 11-19-1999).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|