Excel 2010 VBA Tutorial 13 - IF Statements

preview_player
Показать описание
How to use an IF Statement to control your program flow.
Рекомендации по теме
Комментарии
Автор

Awesome tutorial guide for VBA. I'm in I.T. training now, and these VBA vids really help explain the how's and the why's. Thank you.

Metal_Hed
Автор

I really enjoyed the high pitch "what" But seriously, I love the tutorials they're fantastic.

klr
Автор

Great tutorial.  This has so much potential for what I'm wanting to do.  Learning tonnes.  Thanks for all the videos so far.

colina
Автор

Having just watched your Access Tutorials, I notice you use cake a lot in your examples. I can tell you, "The cake is a lie." (Great tutorials, learning a lot!)

McCartyMM
Автор

Just a quick question, you put "answer" as a STRING
If this isn't done the IF statement still seems to work, why is needed to have "answer" as a string ?

ahtafakram
Автор

Matt thanks for these tutorials, I'm making good use of the skills I'm learning here.
Question - what's your background? as in how did you get good at excel/VBA/databases? did you get a degree in it? or learn on a job?

ianmohlie
Автор

Hi Matt I want to create a maths test for my 6 year old daughter. I wish to create a list of questions and she would need to key her answers, if she is gets its correct she gets the "Well done" msgbox otherwise "wrong answer".

I've done the following, how can I create a list, whether or not she gets the answer right, how could I move on to another question? Thank you so much!!!!


Sub mathstest()

    Dim answer As String
    answer = InputBox("What is 2+2?")
        
        If answer = 4 Then
        
        MsgBox ("Well done Sara!")
        
    Else
    
        MsgBox ("Wrong answer!")
        
    End If
        

End Sub

sigendut