If you wan't to know the state of a single bit, you must use the example I gave you
VB Code:
  1. Public Const KF_TRANSITION_UP As Long = &H80000000
  2.  
  3. If (lParam And KF_TRANSITION_UP) = KF_TRANSITION_UP Then
  4.    'User is releasing the key (key going UP)
  5. End If

If you don't know the value of a const, you can caculate it. It goes like this:
Bit 1 -> const = 1
Bit 2 -> const = 2
Bit 3 -> const = 4
Bit 4 -> const = 8
Bit 5 -> const = 16
Bit 6 -> const = 32
and so on...
Bit x -> const = 2 power x (2^x).

If you wan't get the repeat count, this should do it:
VB Code:
  1. Count = LowWord(lParam)
  2.  
  3. Function LoWord(ByVal Num As Long) As Integer
  4.     If Num And &H8000& Then
  5.         LoWord = Num Or &HFFFF0000
  6.     Else
  7.         LoWord = Num And &HFFFF&
  8.     End If
  9. End Function