Hi guys. I am trying to wrap my head around this concept and getting a little confused. I think I understand their purpose; to be able to use constants in your code with human readable names instead of obscure numerical values to make your code more readable. Is there any other basic purpose than this?

The other main thing that is confusing me is how to use them. I find their use very strange. I wrote a little test program and I need your help. See below for the test program. When I execute the code below it works and prints "param = 1" but I am confused on the types of what I am passing and what I am getting.

Am I passing the Enum value of "Hi" properly in my call to TestEnum? Do I instead create a variable of type Greeting and pass that? Also looking at the first line of the definition of TestEnum I am expecting the value of Integer for param1. Is this correct or should I have declared it as an object of type Greeting? I just find this very confusing. Thanks.

Code:
Public Enum Greeting
Hi = 1
Bye = 2
End Enum

Public Class MyTestClass

Private Sub Parent()
   TestEnum(Greeting.Hi)
End Sub

Private Sub TestEnum(Dim param1 as Integer)
   Msgbox("param1 = " & param1)
End Sub

End Class