jUStPunkin
Board Regular
- Joined
- Mar 23, 2009
- Messages
- 67
All,
I have recieved some help on this prior, but I've been asked to refine the results a little more.
These are the potential combinations.
And this is the code I have currently; it does not account for the G_Feedtype variable.
Is there a way I can update this code, or do I need to try something else? Basically, in addition to what is dictated in the above code, anytime FeedType is set to Mixed or Liquid, I need to hide Spouts, Spouts2 and Redistribution Calculations sheets.
I have recieved some help on this prior, but I've been asked to refine the results a little more.
These are the potential combinations.
Sheet Hidden | |||||
G_TwoTiered | G_CapturedAbove | G_FeedType | Spout | Spouts2 | Redistribution Calculation |
N | N | LIQUID | Visible | Hidden | Hidden |
N | N | MIXED | Visible | Hidden | Hidden |
N | N | VAPOR | Hidden | Hidden | Hidden |
N | Y | LIQUID | Hidden | Visible | Visible |
N | Y | MIXED | Hidden | Visible | Visible |
N | Y | VAPOR | Hidden | Hidden | Hidden |
Y | Y | LIQUID | Hidden | Hidden | Hidden |
Y | Y | MIXED | Hidden | Hidden | Hidden |
Y | Y | VAPOR | Hidden | Hidden | Hidden |
Y | N | LIQUID | Hidden | Hidden | Hidden |
Y | N | VAPOR | Hidden | Hidden | Hidden |
Y | N | MIXED | Hidden | Hidden | Hidden |
And this is the code I have currently; it does not account for the G_Feedtype variable.
VBA Code:
Dim IsNo As Boolean
If UCase(Range("G_TwoTiered").Value) = "Y" Then
Sheets("Spouts").Visible = False
Sheets("Spouts2").Visible = False
Sheets("Redistribution Calculations").Visible = False
Else
IsNo = UCase(Range("G_CapturedAbove").Value) = "N"
Sheets("Spouts").Visible = IsNo
Sheets("Spouts2").Visible = Not IsNo
Sheets("Redistribution Calculations").Visible = Not IsNo
End If
Is there a way I can update this code, or do I need to try something else? Basically, in addition to what is dictated in the above code, anytime FeedType is set to Mixed or Liquid, I need to hide Spouts, Spouts2 and Redistribution Calculations sheets.