Hi,

I have some VBA code that I'm working on, and I'm not sure how to proceed. First of all, can I enbed one if statement inside another? If I can it would solve my problem.

This is basically what I'm going for:

if one>two and three>four then
   if five=six then
   do this
   elseif seven=eight then
   do that
   end if
end if
I'm not sure if that will work. I was thinking I may need a subroutine, or a function. The results of "do this" and "do that" will be required further in my code. If I do need a subroutine or a function, which one, and where does it go, in the main code, or in a module?

Help
Soma