|
-
Jun 20th, 2005, 01:01 AM
#1
Thread Starter
Member
bit operations in VBA
I need to place integer number in 2 bits .
something like this :
dim int_num as integer
dim byte_array(2) as byte
if(int_num < 256) then byte_array(0) = Cbyte(int_num)
else
byte_array(0) = ?
byte_array(1) = ?
end if
Does VBA has a bit shift operators/functions? if no, is there another way to solve my question?
10x
-
Jun 20th, 2005, 02:42 AM
#2
Re: bit operations in VBA
Don't you mean bytes?
Try looking at Hex function ?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 20th, 2005, 03:40 AM
#3
Thread Starter
Member
Re: bit operations in VBA
yes, bytes ...
i haven't found bit shift operations, but there is way to do thit without :
byte_0 = int_num And &HFF
byte_1 = int_num \ &H100 And &HFF
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|