If συνθήκη Then εντολή ... End If
Sub main() Dim Num As Integer Do Num = InputBox("Please enter a number") If Num < 0 Then Num = -Num End If MsgBox "The absolute value is " + Str(Num) Loop Until Num = 0 End Sub
If grade >= 5 Then MsgBox "Περνάει" Else MsgBox "Απορρίπτεται" End If
If grade >= 9 Then MsgBox "'Αριστα!" ElseIf grade >= 7 Then MsgBox "Λίαν καλώς" ElseIf grade >= 5 Then MsgBox "Καλώς" Else MsgBox "Κακώς" End If
Select Case παράσταση Case λίστα τιμών1 εντολή1 εντολή1α ... Case λίστα τιμών2 εντολή2 ... ... Case Else εντολή ν ... End Select
Dim Number As Integer Number = InputBox("Enter a Number") Select Case Number ' Evaluate Number. Case 1 To 5 ' Number between 1 and 5. MsgBox "Between 1 and 5" Case 6, 7, 8 ' Number between 6 and 8. MsgBox "Between 6 and 8" Case Is > 8 And Number < 11 ' Number is 9 or 10. MsgBox "Greater than 8" Case Else ' Other values. MsgBox "Not between 1 and 10" End Select
For μετρητής = αρχική τιμή To τελική τιμή [Step βήμα] εντολή ... [Exit For] εντολή ... Next [μετρητής]
dim i as integer For i = 10 to 0 step -1 msgbox "Countdown: " + str(i) next i
do while true i = InputBox("Give a number less than 100") if i < 100 then exit do end if msgbox "Try again" loop
Ποσό | Επιτόκιο |
0-999.999 | 2.25 |
1.000.000-4.999.999 | 2.5 |
5.000.000-10.000.000 | 2.8 |
10.000.000 και άνω | 2.9 |