有text1/text2和text3。判斷如果3個text都為空,在text1寫入combo1。如果text2和3為空,text1不為空,在text2寫入combo1。如果text3為空,text1和2不為空,在text3寫入combo1。折磨我一晚上了,沒搞對 求助
uj5u.com熱心網友回復:
If Text1.Text = "" Then
Text1.Text = Combo1.Text
ElseIf Text1.Text <> "" And Text2.Text = "" And Text3.Text = "" Then
Text2.Text = Combo1.Text
ElseIf Text1.Text <> "" And Text2.Text <> "" And Text3.Text = "" Then
Text3.Text = Combo1.Text
End If
很簡單的。
uj5u.com熱心網友回復:
If Text1 & Text2 & Text3 = "" Then
Text1 = Combo1.Text
ElseIf Text2 & Text3 = "" Then
Text2 = Combo1.Text
ElseIf Text3 = "" Then
Text3 = Combo1.Text
End If
uj5u.com熱心網友回復:
if ""=text1.text and "" = text2.text and "" = text3.text thencombo1.text = text1.text
elseif "" = text2.text and "" = text3.text and ""<>text1.text then
combo1.text = text2.text
elseif "" <> text1.text and "" <> text2.text and ""= text3.text then
combo1.text = text3.text
end if
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/60960.html
標籤:VB基礎類
