vb怎样在一个字符串中替换里面的另外一个字符串
展开全部
Mid(String1, Start1, 1) = Mid(String2, Start2, 1)中start1是string1中要替换位置起始字符的位置,1为要替换的 个数,start2是string2中将要替换到string1中的的字符的起始位置,个数与前面相同,也为1,例:
Dim a As String
a = "abcdefghijk"
Dim b As String
b = "123456789"
Mid(a, 3, 1) = Mid(b, 5, 1)
Text1 = a
运行结果为ab5defghijk
Dim a As String
a = "abcdefghijk"
Dim b As String
b = "123456789"
Mid(a, 3, 1) = Mid(b, 5, 1)
Text1 = a
运行结果为ab5defghijk
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询