View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Bitwise shift in VBA

Function BitShift(StartValue, BitsToShift)
BitShift = StartValue * (2 ^ BitsToShift)
End Function


--
__________________________________
HTH

Bob

"TheWizEd" wrote in message
...
How do you perform a bitwise shift in VBA (Excel)?

I have seen an operator in some VB code like this.

x = y << 8 ' I believe this mean shift y 8 bits to the right

But this is not in VBA. Any suggestions?