Thread
:
Nesting limits in VBA
View Single Post
#
5
Posted to microsoft.public.excel.programming
Tushar Mehta
external usenet poster
Posts: 1,071
Nesting limits in VBA
Hi Tom,
In article ,
says...
how to make it flatter would depend on the criteria - if they don't have to
checked sequentially, then use the And statement
if 1< i and 2 < i and 3 < i and 4 < i and 5 < i and 6 < i then
end if
as an example.
Alternatively, just reverse the tests...
If i15 then
ElseIf i 14 then
ElseIf i 13 then
....
elseif i1 then
else
end if
--
Regards,
Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
Reply With Quote
Tushar Mehta
View Public Profile
Find all posts by Tushar Mehta