就是假设原来textbox里有一个字符“a”,在执行一道命令之后添加一个“,b”,使textbox里的内容变成“a,b”.望高人帮一把。

解决方案 »

  1.   

    Text1.Text = Text1.Text & ",b"
      

  2.   

    Text1.Text = Text1.Text & ",b"是常见办法,但这是字符连接操作,当内容多时会越来越慢,理想的办法是:    With Text1
            .SelStart = Len(Text1.Text)
            .SelLength = 0
            .SelText = s
        End With而且这样还会让文本框,自动滚动到最后,以显示新增的内容,聊天程序中常用。
      

  3.   

    Text1.SelStart = Len(Text1.Text)
    Text1.SelLength = 0
    Text1.SelText = ",b"
      

  4.   

    With Text1
            .SelStart = Len(Text1.Text)
            .SelLength = 0
            .SelText = s
        End With
      

  5.   


    Text1.SelStart = Len(Text1)
    Text1.SelText =  ",b"
    Text1.SelLength = 0 这句可以不要