看板 Visual_Basic 關於我們 聯絡資訊
※ 引述《likewinnie (winnie)》之銘言: : ※ 引述《greencup (飄)》之銘言: : : 我想做的是把text1.text="hello"這個動作 : : 改成先將text1.text的部分換成變數(ex.i) : : 再i="hello" : : 可以實現嗎? : 你是說改成text1.text=i ? : 再i="hello" ? : text1.text=i ==>可以呀. : 不過你如果這樣寫 : text1.text=i : i="hello" : 那當然不行啦... : 要換一下順序... : i="hello" : text1.text=i : 不過我覺得奇怪,那麼基本的問題你何不try一下? try了就知道啦 我可能表達不太好= = 原意是想寫 If Form1.Text2.BackColor = &H80000002 then i= Form1.Text2 ElseIf Form1.Text3.BackColor = &H80000002 Then i = Form1.Text3 ElseIf Form1.Text4.BackColor = &H80000002 Then i = Form1.Text4 end if i.text="hello~" 這樣i是不是需要定義成什麼樣的變數才可以執行? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.112.49.71
O2000:把i宣告成TextBox就行了 03/14 17:58
greencup:恩 改過以後就可以用了 謝謝喔~ 03/14 18:47