Boolean operators and evaluation order

Microsoft OFFICE

    Sponsored Links


  • 1. About Workbook level declarations?
    Hello, Trying to meet deadline but couldn't find anything in MS documentation re making variable declarations at the Workbook level under ThisWorkbook. If I make such a variable declaration there with Option Explicit and Public, will it be available to all Worksheets and modules code? I created a boolean such var and one worksheet code module recognized it but another cried "Variable Not Defined". I was trying to avoid putting it into a code module if possible. Thanks, God bless Van
  • 2. Is there a Single Example code for Office Speech in VBA
    That shows how to recognize voice input to click the button. I realize this is mundane and trivial, or at least should be... However, in hours of searching MSDN and Microsoft sites I can't seem to find one. I've downloaded about 4 Gb of SDK's including SAPI 3,5 some other SDK Version 1.1 that seems to be newer. I have .NET Framework 2.0, Office 2003... a bewildering arsenal of tools. My speech input works for dictation and voice command. It is trained to hear my words.... Now.... How to write a basic form in VBA or C# that is speech enabled. ... thanks in advance.
  • 3. Tool to store my VBA codes
    Hello all, I am looking for a tool / software where I can store my VBA codes. Any onde any suggestions?
  • 4. Converting TextRange BoundLeft/Top to Screen coordinates?
    (No luck in powerpoint.public, hopefully this forum somebody can help..) I have read for Excel that you have to do some conversion with PointsToScreenPixelsX/Y but then need to apply some more logic to convert to the current actual screen DPI since that function is based on 72 dpi. Is this true for Powerpoint as well, or does some have some working code they can paste for converting TextRange BoundLeft/Top to screen coordinates?
  • 5. PowerPoint 2003: Applying "Default Design" to presentations via VB
    Hello, I'm hitting a problem trying to assign the "Default Design" template to presentations using VBA. If I record a macro and perform the actions manually (Format -> Slide Design -> Default Design.pot) I get the following code: Sub Macro1() ActivePresentation.ApplyTemplate FileName:="" End Sub If I then try to run this macro I get the following error: "Run-time error '-2147188160 (80048240)': Presentation (unknown member): Invalid request. PowerPoint could not open the file." I read elsewhere that the file may actually be called "blank.pot" and could be stored in my user profile but I searched there and had no joy. Does anyone know what the correct filename and path for "Default Design.pot" is? Or whether there is a different way to modify a presentation from VBA so that it ends up based on the "Default Design" template? Regards, Mike

Boolean operators and evaluation order

Postby F.H. van Zelm » Mon, 12 Jan 2009 06:14:11 GMT

Hi there,

Everyone knows the order for arithmatic operators: first (), then ^, * and / 
followed by + and -.
(I know it is a bit more complex than this.)

But what about AND, OR, XOR, EQV and IMP in a combined comparison?
E.g. True AND False OR True. Is it always simply left-to-right, apart from 

I couldn't find information on the Internet and my math is moderate ...

Mvg, Frans 

Re: Boolean operators and evaluation order

Postby F.H. van Zelm » Mon, 12 Jan 2009 06:57:18 GMT


Thanks for your attention and help. The article, you mentioned says:
VBA doesn't have ANDALSO and ORELSE whereas EQV and IMP are not
mentioned. Do you have any idea about EQV and IMP?

By the way: is this a general math rule like 'Please exuse my dear aunt 


"Jay Freedman" < XXXX@XXXXX.COM > schreef in bericht 

Re: Boolean operators and evaluation order

Postby Jay Freedman » Mon, 12 Jan 2009 07:55:16 GMT

I should have checked this before: In the Word 2003 VBA help, there is actually
a topic titled "Operator Precedence". It indicates that the order is


I suspect that at this order is more at the discretion of the person specifying
the compiler/interpreter, rather than a generally recognized convention.

Similar Threads:

1.Boolean Operator in {if}?

Dear all,

    I would like to show a record if two mergefields are not empty. Can I 
use a boolean operator "AND" in the command {IF}?

Best Regards,

2.Using Boolean operators in code fields

Is it possible to use Boolean operators AND and OR in code fields?

E.g. {IF condition AND condition action1 action2}

If not, is there any other way to solve that problem?

Thanks for answers,


3.Boolean Operators In search and Replace


In Column D I have numbers to two decimal places.

I want to change all those below a certain number to a single higher 
number. For example , all those less than 3.00 should become 3.00.

Is it possible to do this via the Find and Replace dialogue , or via 
some code in a macro?

Any help appreciated.

4.Are there Boolean operators in MS Excel?

5.Cells.Find method and Boolean operators

6. Change Boolean / Logical Operator using Input Cell

7. Boolean Operators in IF function (Excel)

8. boolean to control sort order

Return to Microsoft OFFICE


Who is online

Users browsing this forum: No registered users and 83 guest