dim a(1 to 200) as string
dim exit_while as boolean
dim str
dim i as integer
dim j as integer
dim s as string
i=1
s=".........." '很长的
whiel not exit_while
str=right(s,70)
a(i)=str
j=len(s)-70
if j>0 and i<201 then
s=left(s,j)
else
exit_while=true
end if
wend
dim exit_while as boolean
dim str
dim i as integer
dim j as integer
dim s as string
i=1
s=".........." '很长的
whiel not exit_while
str=right(s,70)
a(i)=str
j=len(s)-70
if j>0 and i<201 then
s=left(s,j)
else
exit_while=true
end if
wend
解决方案 »
- Here are some frequently asked VB questions that may be useful for beginners.
- VB的DLL调用怎么“DLL调用约定错误”
- 水晶报表中能不能打印条形码?
- 是否能够访问到“\\SzNet-02\PathDOWNLOAD\”是怎么表示的?
- ocx测试通过但是运行报错,急
- 在VSFlexgrid8中,怎么设定指定行的背景色
- 高手进来帮帮忙 查询优化问题 实在搞不定了(小弟菜,没分给了,实在不好意思)
- MScomm控件直接读取二进制数,一定有分!
- 如何修改其他窗体的属性
- MDI窗体的问题 一定给分
- 如何实现类似EXEL中的单元格黑字提示功能,100分求教!
- 高手告诉我如何读文件中的中文啊
dim str as string
dim strdim '数组维数
dim i as long
str="xxx……" '此为字符串
strdim=len(str)\70
if strdim mod 70<>0 then
strdim=strdim+1
end if
redim a(strdim)
for i=0 to strdim
a(i)=mid(i*70 +1,str,70)
next楼主,这个满足你的意思吗?
Dim TempStr as StringDim StrData() as String
Dim StrCount as longDim I as long
TempStr=……
StrCount=(Len(TempStr)+StrStep-1)\StrStep
If StrCount<>0 Then
ReDim StrData(0 to StrCount-1)
For I=0 to StrCount-2
StrData(I)=Mid$(TempStr, StrStep*I+1, StrStep)
Next I
StrData(StrCount-1)=Mid$(TempStr, StrStep*(StrCount-1)+1)
End If