CitectVBA Programming Reference > Understanding CitectVBA Language Basics > Control Structures > End statement

End statement

The End statement Ends a block of statements such as a Sub procedure or Function.

End[{Function | If | Sub}]

Example

Dim Var1 as String
Var1 = "hello"
' Calling Test
Test Var1
MsgBox Var1

Sub Test(wvar1 as string)
MsgBox wvar1
wvar1 = "goodbye"
End
End Sub

See Also

Control Structures