Solved

Which is quicker?

Posted on 1998-11-21
1
283 Views
Last Modified: 2010-05-03
Which of these is quicker ?

"Iif" (inline if) or "If.. then... End If" ???
Speed is cruicial in the routine I need them in...
0
Comment
Question by:lbowers
1 Comment
 
LVL 2

Accepted Solution

by:
KJHDI12 earned 50 total points
ID: 1446039
I did some calculations and ran them in 1000000 loops and got this result:

  If then else end if:        1492ms
  Iif                         9500ms

I used the ARTimer control to time it. It's free and you can download it at www.download.com.

Mr. Fixit

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Suggested Solutions

Title # Comments Views Activity
passing parameter in sql procedure 9 65
How to compare ms sql hashbytes results within vb6 5 85
Added a column screws up code 5 63
IF ELSE Statement in Excel Macro VBA 16 75
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

820 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