I have a custom message box type thing and I'm not sure how to do this. I want to know how to set up the select case statement.

Anything you can tell me about how to do this is appreciated. I've never understood bitwise comparison, so I always use brute force in these situations - I.e. check every possible combination.

VB Code:
  1. Public Enum CommandButtons
  2.   cbOK = 0 ' Default ' Should I start with 0 ???
  3.   cbCancel = 1
  4.   cbYes = 2
  5.   cbNo = 4
  6.   cbPrevious = 8
  7.   cbNext = 16
  8.   cbQuestion = 32
  9.   cbHelp = 1024
  10.   cbDontShowAgain = 2048
  11. End Enum
  12.  
  13. Sub DisplayButtons(iValue as long)
  14. ' iValue needs to be split up to display the proper buttons
  15.  
  16. ' How do I write this sub????
  17.  
  18. Select case iValue
  19.  
  20. End Select
  21.  
  22. End Sub