Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Showing or Hiding rows based on data validation list
I am trying to create show different rows to an "order" sheet based on the
answer from a data validation list. So, for example, if the payment type chosen for this order is "Credit Card" I would like rows 16,17 to pop up, and if "Check" is chosen i want rows 18,19 to pop up, and so on. And conversly, if "nothing" is chosen, all the rows are hidden. I've successfully used something I found on here to show or hide rows based on a checkbox: Private Sub CheckBox1_Click() If CheckBox1 = True Then Range(Rows(10), Rows(11)).EntireRow.Hidden = False ElseIf CheckBox1 = False Then Range(Rows(10), Rows(11)).EntireRow.Hidden = True End If End Sub This works great,, but I would rather use either a simple data validation list or a combobox. I tried to apply this idea to the content in a cell like so: If A15 = "" Then Range(Rows(10), Rows(11)).EntireRow.Hidden = True If A15 = "CC" Then Range(Rows(10), Rows(11)).EntireRow.Hidden = False but to no avail. I am, like many, such a n00b. Any push in the right direction would be most appreciated. BTW, the content here has been invaluable. Whew, ya'll are making me look good. THX -- Murphy''s first law of combat: Incoming fire always has the right of way. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data Validation List (Drop Down) Not Showing | Excel Discussion (Misc queries) | |||
Hiding/Showing Rows on Cell H2 Change | Excel Discussion (Misc queries) | |||
Data Validation List Not Showing | Excel Discussion (Misc queries) | |||
hiding or showing rows based on a cell value | Excel Discussion (Misc queries) | |||
Data Validation - Allow List - In-cell Dropdown not showing up | Excel Programming |