View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Several AND operators inside an IF...

It'll work, its just a syntax error. Try inputting the command as a single
line of code, watching our for erroneous spaces.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"SpeeD" wrote:

Hi guys.

I have the folowing problem. i need to check 3 conditons inside an IF to
make may macro work. The problem is that it only work with 1 AND not 2 inside
the IF...

Can anyone help me?

This works...
If Sheets("Original 1").Visible = False And Sheets("Original 2").Visible =
False Then GoTo 1

This doesn´t work!!!
If Sheets("Original 1").Visible = False And Sheets("Original 2").Visible =
False And Sheets("Original 3").Visible = False Then GoTo 1