Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a survey template created by another that I am modifying for my use. The template includes dropdown boxes for secondary questions based on responses to primary questions. The code instructs Excel to hide rows & set visible properties of the dropdown boxes in those rows to false. If the user goes back and answers a question with a secondary response, the rows reappear as programmed, but the combo boxes will stack up below the original selection. Here is a sample of the code used: If Sheets("parameters").Range("acty_d1_value").Value = 0 Then 'hide drop down boxes ActiveSheet.cbx_a1d1.Visible = False ActiveSheet.cbx_a1d2.Visible = False ActiveSheet.cbx_a1d3.Visible = False 'Black out the activity name and total ActiveSheet.Range("get_info_detl_a1").Select Selection.RowHeight = 0 ActiveSheet.Range("a1").Select Else 'unhide drop down boxes ActiveSheet.cbx_a1d1.Visible = True ActiveSheet.cbx_a1d2.Visible = True ActiveSheet.cbx_a1d3.Visible = True 'make rowheight 45 ActiveSheet.Range("get_info_detl_a1").Select Selection.RowHeight = 25 ActiveSheet.Range("a1").Select get_info_detl_a1 refers to teh entire range of the questions & dropdowns for the A1 series; the cbx references are the names I gave the combo boxes. Any suggestions? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
Can't unhide rows | Excel Discussion (Misc queries) | |||
Unhide rows 1 - 9 | Excel Discussion (Misc queries) | |||
unhide row does not unhide the hidden rows | Excel Worksheet Functions | |||
unhide rows | Excel Discussion (Misc queries) |