Collabora Office 24.04 Help
프로시저나 블록을 끝냅니다.
End, End Enum, End Function, End If, End Property, End Select, End Sub, End With
End 문을 다음과 같이 사용합니다.
End: 필수 사항이 아니지만 프로시저 내의 임의의 위치에 입력하여 프로그램 실행을 끝낼 수 있습니다.
End Enum: Ends an Enum VBA statement
End Function: Function 문을 끝냅니다.
End If: If...Then...Else 블록의 끝을 표시합니다.
End Property: Marks the end of a Property statement.
End Select: Select Case 블록의 끝을 표시합니다.
End Sub: Sub 문을 끝냅니다.
End With: Ends a With statement
Sub ExampleRandomSelect
Dim iVar As Integer
iVar = Int((15 * Rnd) -2)
Select Case iVar
Case 1 To 5
Print "Number from 1 to 5"
Case 6, 7, 8
Print "Number from 6 to 8"
Case Is > 8 And iVar < 11
Print "Greater than 8"
Case Else
Print "Outside range 1 to 10"
End Select
End Sub