vba low word from Long Integer

The solution for “vba low word from Long Integer” can be found here. The following code will assist you in solving the problem.

‘If n is a 4-byte Long Integer, the Low (Left) Word is:
If n And &H8000& Then
LoWord = n Or &HFFFF0000
Else
LoWord = n And &HFFFF&
End If

‘If n is a 4-byte Long Integer, the High (Right) Word is:
HiWord = (n And &HFFFF0000) \ &H10000

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts