Double 'IF' statement

Basically what I have is two text boxes and I want to use a statement such as the 'If' statement, but with two if's in.  For example

Private sub command1_click()

If text1.text = "200" + If text2.text "400" then
      
      End

      End If

End sub


Can someone please show me the right way to do this if possible

Thanks
LVL 3
SirNickAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jjmartinConnect With a Mentor Commented:
Use the And keyword:

If text1.text = "200" And text2.text "400" then
   'Do Something
end if



0
 
SirNickAuthor Commented:
Edited text of question.
0
 
SirNickAuthor Commented:
Thanks that worked

I did this before but I included another 'If' after the and which was where I was going wrong
0
All Courses

From novice to tech pro — start learning today.