Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Opposite Value of What CBool(Variable) evaluates to

Posted on 2008-11-19
2
Medium Priority
?
380 Views
Last Modified: 2012-06-22
How do i programmtically, in one line get the opposite value of what cbool is evaluating to.  So if Cbool(Var) = True, how would I write the code so that the value would be false.

An example of what i'm doing might help:
Application("VendorVisible") = True

ddlVendorID.visible = Cbool(Application("VendorVisible") )
ddlSalesSiteID.visible = -CBool(Application("VendorVisible"))

In this example if Application("VendorVisible") = true then the dropdownlist VendorID should be visible but the dropdownlist SalesSiteID should not.  I want to avoid an if/then statement.
0
Comment
Question by:davidcahan
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 1000 total points
ID: 22996922
ddlVendorID.visible = not Cbool(Application("VendorVisible") )

(or c#: ddlVendorID.visible = ! Cbool(Application("VendorVisible") )
0
 

Author Comment

by:davidcahan
ID: 22996948
perfect...thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question