合众思壮李亚楠老公:关于vb中文本框数据设为变量的问题!

来源:百度文库 编辑:神马品牌网 时间:2024/05/05 20:10:22
在text1中有许多行文字,我想一行一行提取它并在以后的过程中设为变量,应该怎么实现!
id是“超越神的人”可以给我联系方式吗?
我得联系qq82686139,麻烦联系我!
以上定义变量部分是放在通用的声明里吗?那下面的代码呢,是放置于form的load里吗?还有我可以联系你吗?
再往下是我想把刚才得到的变量输入到文本文档中,第一行的输入到1.txt,第二行的输入到2.txt,以此类推,要如何实现呢?

以下通过测试,谢谢你看得起我!
编程思想:换行是通过 回车(chr 13),换行( chr 10)来实现的
dim s as string
dim sdat() as string
dim sdatcount as string
s=text1.text
sdatcount=0
do until instr(1,s,chr(13))=0
sdatcount=sdatcount+1
redim preserve sdat(1 to sdatcount) as string
sdat(sdatcount)=mid(s,1,instr(1,s,chr(13))-1)
s=mid(s,instr(1,s,chr(13))+2)
loop
sdatcount=sdatcount+1
redim preserve sdat(1 to sdatcount) as string
sdat(sdatcount)=s
还有增加的:要考虑空行。
我用QQ加你了,具体在QQ里面聊
其实我的联系方式在我的个人资料里面有的