excel vba convert 2 Short integers to a Long integer excel vba low word from Long Integer

The solution for “excel vba convert 2 Short integers to a Long integer excel vba low word from Long Integer” can be found here. The following code will assist you in solving the problem.

Public Function MakeLong&(ByVal LoWord%, ByVal HiWord%)
MakeLong = (HiWord * &H10000) Or (LoWord And &HFFFF&)
End Function’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