It sounds like you haven't read the manual properly. Why do you think it never works as it's supposed to? Why do you think you can iterate over a string? The For Each command only iterates over collections and arrays. The Text property is just a String.
Let me try again. Text1.Text is a single string, so you can just print it out like a string variable. If your text box is multi-line, the string is still a single string but it contains carriage return characters (chr(13)) to delimit each line. As for a manual, you don't actually need one, as the F1 Help facility contains much useful information to get you going. However, if you have come from an old, procedural type of Basic language (such as the ones you used to get on the old DOS systems), you'll need to know a little bit about object-oriented programming in order to use VB effectively.
If you don understand what klint was trying to tell you then you need to go back to basics and learn the difference between strings, variables, collections and arrays. Fundamental stuff in any programming language.
There is only one Text1.text so for each is meaningless in this context. However if text1.text was part of an array, e.g text1(0)text, text1(1).text, etc, then it would work. If you learn nothing else, learn about arrays. Very powerful concepts when used properly
The entire VB6 documentation is available on-line - all you ever needed to know about VB6. All you have to do is read it.
In VB.Net, all variable types are derived from the object class. Therefore on "may" iterate using the For...Each loop. No. But then it doesent hurt to read the manual
You can argue, fight and quarrel all you want, but at the end of the day you will have a headache
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE