EXCEL VBA TEXTBOX問題?

2021-01-27 5:00 pm
請問知識+的EXCEL VBA高手,我UserForm裡有設計TEXTBOX1跟TEXTBOX2,我想做一個按鈕,按下去可以將TEXTBOX1跟TEXTBOX2裡已經輸入的資料互換,不知道怎麼寫? 小弟初出茅廬在摸索學習中希望有高手能幫忙!!

回答 (1)

2021-01-28 3:45 pm
✔ 最佳答案
Private Sub CommandButton1_Click()
Dim Tx1 As String
Dim Tx2 As String
Tx1 = TextBox1.Text
Tx2 = TextBox2.Text

TextBox1.Text = Tx2
TextBox2.Text = Tx1
End Sub


收錄日期: 2021-05-03 06:57:57
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20210127090056AAZkoJr

檢視 Wayback Machine 備份