I am working on creating a bunch of dropdown lists where the answers of some of the questions are dependent on others.
So for example, if someone answers no from a yes/no question on line 34, rows 35:39 will be hidden and also rows 203:208 will be hidden.
If Target.Address = "$G$34" Then
Application.EnableEvents = False
Select Case Target.Value
Case "Yes"
Rows("35:39").Hidden = False
Rows("203:208").Hidden = False
Case "No"
Rows("35:39").Hidden = True
Rows("203:208").Hidden = True
End Select
Application.EnableEvents = True
End If
However, I also have criteria set for rows 203:208.
If Target.Address = "$G$203" Then
Application.EnableEvents = False
Select Case Target.Value
Case "Permissive to Customer motor"
Rows("204").Hidden = False
Rows("205:208").Hidden = True
Case "Permissive to Standard motor"
Rows("204:208").Hidden = True
Case "Permissive with Standard V.D."
Rows("204").Hidden = True
Rows("205").Hidden = False
Rows("207").Hidden = False
Case "Permissive with Customer V.D."
Rows("204").Hidden = False
Rows("205").Hidden = False
Rows("207").Hidden = False
On top of this, I have developed a command button that sets the entire spreadsheet to a basic standard of options.
I am connecting this to the back end, so fields that are not standard will be filled in with a blank so as the items are not counted and not factored into the cost.
The issue I am having is when I reset to the default, rows 203:208 are set to blank. Because I have multiple conditions from Rows 34 and also the conditions for the hidden rows for 203:208, it will not hide the rows of 203:208 when they are blank, even though row 34 states "No".
How can I change the coding up so that even though 203:208 are blank, they still become hidden when row 34 is no.?
-Bob
Bookmarks