I guess this is what you want to do
VB Code:
  1. Private Enum State
  2.    Dormant = 1
  3.    Listening = 2
  4.    Connecting = 3
  5.    Connected = 4
  6. End Enum
  7.  
  8. Sub Status(intState As State)
  9.      'your code here
  10. End Sub