Instruci贸n End

Finaliza un procedemento ou bloque.

Sintaxe:


End, End Enum, End Function, End If, End Property, End Select, End Sub, End With

Par谩metros:

Use a instruci贸n End da seguinte maneira:

Instruci贸n

End: Non 茅 obrigatoria, mais pode introducirse en calquera parte dun procedemento para finalizar a execuci贸n dun programa.

End Enum: Ends an Enum VBA statement

End Function: Ends a Function statement.

End If: Marks the end of a If...Then...Else block.

End Property: Marks the end of a Property statement.

End Select: Marks the end of a Select Case block.

End Sub: Ends a Sub statement.

End With: Ends a With statement

Exemplo:


Sub ExampleRandomSelect
Dim iVar As Integer
    iVar = Int((15 * Rnd) -2)
    Select Case iVar
        Case 1 To 5
            Print "N煤mero do 1 ao 5"
        Case 6, 7, 8
            Print "N煤mero do 6 ao 8"
        Case Is > 8 And iVar < 11
            Print "Maior que 8"
        Case Else
            Print "F贸ra do rango de 1 a 10"
    End Select
End Sub

Precisamos da s煤a axuda!