|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
When do we need to use endif to end the conditional statement? I just wanted to know what all things I need to know to think about the endif statement. When are you supposed to use endif to end the conditional statement. A conditional statement is a way for you to execute commands based on if a condition is true. It is easiest to understand by examples. Please let me know the suggestions for it. |
#2
| |||
| |||
Re: When do we need to use endif to end the conditional statement? In the conditional statement "if", while at the time of closing the if condition we use the endif in the traditional way. If you want to execute more than one statement when a condition is true, you must put each statement on separate lines, and end the statement with the keyword "End If": Code: If i=10 Then msgbox "Hello" i = i+1 End If |
#3
| |||
| |||
Re: When do we need to use endif to end the conditional statement? A conditional statement is a way for you to execute commands based on if a condition is true. It is easiest to understand by examples. You can use the If...Then...ElseIf statement if you want to select one of many blocks of code to execute: In the Code Editor, click the arrow of the Object combo box and select Form. This tutorial relies on you understanding how variables work. |
#4
| |||
| |||
Re: When do we need to use endif to end the conditional statement? The standard conditional statement: the value of the Boolean expression is evaluated. If the result is {true}, the first block of statements is executed, if the result is {false} the second block of statements is executed. For example if we set var1 = 5 and have the statement If var1 < 10 Then ... We can read it as follows if 5 is Less Than 10 - This would be true so our code gets executed. |
![]() |
|
Tags: conditional statement, endif |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel Macros for conditional formatting statement in Excel | Kungfu Pandey | Microsoft Project | 1 | 08-01-2012 08:35 PM |
Dns delegation vs Conditional forwarding | aconti | Active Directory | 4 | 16-11-2009 12:33 PM |
Conditional forwarder not resolving | dwiddifield | Networking & Security | 0 | 27-08-2009 08:25 AM |
Conditional formatting in excel | RockeЯ | Windows Software | 4 | 27-06-2009 12:06 PM |
What is the difference between while statement & do statement? | Athos | Software Development | 4 | 25-02-2009 08:52 PM |