vb 如何删除字符串中的首尾字符

如题所述

第1个回答  2011-06-17
不能删除
使用以下函数
Function Mid(String, Start As Long, [Length])
VBA.Strings 的成员
从一个字符串中返回指定数目的字符
第2个回答  2011-06-17
删除字符串s中的首尾字符,长度减少2:
L=len(s)
s=mid(s,2,L-2)

靠谱
第3个回答  2011-06-17
删除字符串s中的首尾字符,长度减少2:
L=len(s)
s=mid(s,2,L-2)
第4个回答  2011-06-17
function Sub(byval str as string) as string
dim str as string,n as long
n=len(str)
Sub=right(left(str,n-1),n-1)
end function
应该可以吧 没有测试本回答被网友采纳
第5个回答  2019-03-26
t=Text1
a=Len(Text1)
Text 2=Mid(t,2,a-2)