jUStPunkin
Board Regular
- Joined
- Mar 23, 2009
- Messages
- 67
Hi all,
I'm a bit stumped by this, because the code seems simple enough. I have a criteria, set one way, I want certain sheets to show, set another way, I want other sheets to show.
If my value for "G_CapturedAbove" is N, it works fine.
If my value for "G_CapturedAbove" is Y, it does not hide the spout sheet. Any thoughts?
I have tried this with the ElseIf to just be a Else without the range value, but that didn't work either.
I'm a bit stumped by this, because the code seems simple enough. I have a criteria, set one way, I want certain sheets to show, set another way, I want other sheets to show.
If my value for "G_CapturedAbove" is N, it works fine.
If my value for "G_CapturedAbove" is Y, it does not hide the spout sheet. Any thoughts?
I have tried this with the ElseIf to just be a Else without the range value, but that didn't work either.
VBA Code:
If Range("G_CapturedAbove").Value = ("N") Then
Sheets("Spouts").Visible = True
Sheets("Spouts2").Visible = False
Sheets("Redistribution Calculations").Visible = False
ElseIf Range("G_CapturedAbove").Value = ("Y") Then
Sheets("Spouts").Visible = False
Sheets("Spouts2").Visible = True
Sheets("Redistribution Calculations").Visible = True
End If