LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Can I use AND like this

like a bitwise and,

I've definded constants const_add 1, const_sub 2, const_div 4 ,, 8 , 10 , 20
etc

if CheckBox_Add.Value = True Then
lChecks = lChecks And const_Add
End If

If CheckBox_Sub.Value = True Then
lChecks = lChecks And const_Sub
End If


I'd like pass lChecks to a function and have that function do something like

if lChecks and const_add = true then
......


It all looks ok but my lines like lChecks = lChecks And const_Add don't set
lChecks to anything

Thanks


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"