Home > Software engineering >  Nested if statements
Nested if statements

Time:09-21

Text1/text2 and text3, determine if all three text is empty, write combo1 in text1, if text2 and 3 empty, text1 is empty, not in text2 write combo1, if text3 is empty, text1 and 2 is not empty, in text3 write combo1, torture me a night, didn't have to ask for help

CodePudding user response:

 
If Text1. Text="" Then
Text1. Text=Combo1. Text
ElseIf Text1. Text & lt;> "" And Text2. Text=" And "Text3. Text=" "Then
Text2. Text=Combo1. Text
ElseIf Text1. Text & lt; & gt; "" And Text2. Text & lt; & gt; "" And Text3. Text=" "Then
Text3. Text=Combo1. Text
End the If

Very simple,

CodePudding user response:

 
If Text1 & amp; Text2 & amp; Text3="" Then
Text1=Combo1. Text
ElseIf Text2 & amp; Text3="" Then
Text2=Combo1. Text
ElseIf Text3="" Then
Text3=Combo1. Text
End the If

CodePudding user response:

If ""=text1. Text and" "=text2. The text and" "=text3. Text then
Combo1. Text=text1. Text
Elseif ""=text2. Text and" "=text3. The text" and "" & lt;> Text1. Text then
Combo1. Text=text2. Text
Elseif "" & lt;> Text1. Text "and" "& lt;> Text2. Text and ""=text3. Text then
Combo1. Text=text3. Text
end if
  • Related