Try this:
------------------Code:Option Explicit Private Const FLAG1 = &H1 Private Const FLAG2 = &H2 Private Const FLAG3 = &H4 Function MyFunction(ByVal Flags As Long) Dim FlagIsSet(1 To 3) As Boolean FlagIsSet(1) = ((Flags And FLAG1) = FLAG1) FlagIsSet(2) = ((Flags And FLAG2) = FLAG2) FlagIsSet(3) = ((Flags And FLAG3) = FLAG3) If FlagIsSet(1) Then Debug.Print "FLAG1 is set." If FlagIsSet(2) Then Debug.Print "FLAG2 is set." If FlagIsSet(3) Then Debug.Print "FLAG3 is set." End Function
Yonatan
Teenage Programmer
E-Mail: [email protected]
ICQ: 19552879
AIM: RYoni69




Reply With Quote