Hi,
A general question: which is more efficient?
(Assume case statements, etc., cannot be used.)
-- or --Code:If a Then If x Then ax() ElseIf y Then ay() End If ElseIf b Then If x Then bx() ElseIf y Then by() End If ElseIf c Then If x Then cx() ElseIf y Then cy() End If End If
Code:If a AndAlso x Then ax() ElseIf a AndAlso y Then ay() ElseIf b AndAlso x Then bx() ElseIf b AndAlso y Then by() ElseIf c AndAlso x Then cx() ElseIf c AndAlso y Then cy() End If




Reply With Quote