Results 1 to 13 of 13

Thread: [RESOLVED] Test if argument is part of enumaration

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Resolved [RESOLVED] Test if argument is part of enumaration

    The question is straight forward how can I test is an argument passed down a function is part of an enummeration in one statment.

    Example enumeration:

    Public Enum EnumBaseKeys
    HKEY_CLASSES_ROOT = &H80000000
    HKEY_CURRENT_USER = &H80000001
    HKEY_LOCAL_MACHINE = &H80000002
    HKEY_USERS = &H80000003
    End Enum

    Example Function:

    Public Function Makekey(Optional Hkey As EnumBaseKeys, Optional Subkey As String) As Boolean

    now how to check if Hkey is a member of EnumBasekeys?

    Thanks in advance.
    Last edited by Hack; Jan 18th, 2006 at 07:51 AM.
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width