richtextbox1.TextRTF = richtextbox1.TextRTF & "AAAAAA"<br>不行<br>多多指教
更正﹕ 標題為 在richtextbox加入 text的語法如何
.text=.text + Ustr
阿戊兄﹕ 不行 .text=.text + Ustr 這樣會使到所有字體顏色變成黑色(default) With richtextbox1 .Text = "Good Morning " .SelStart = 3 .SelLength = 5 .SelColor = vbRed .SelLength = 0 .SelStart = Len(.Text) .SelColor = vbRed .Text = .Text + "Hello" End With 怎麼辦﹖
要不影響原內容: Text = .Text + "Hello" 改成: .SelText = "Hello"
阿戊兄 謝謝你