Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet that I am automating. I have 15 lines with 15 comboboxes
each are labeled uniquely and based on the selection I need it to hide rows on multiple sheets. Here is what I have for one combobox, they are all very similar: Private Sub ComboBox2XR_Change() Dim c As String Dim d As String c = _ Worksheets("ReportRequestXR").Cells.Find(What:="Ac tXR2" & i & "_BEGIN", after:=Range("A1"), LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False).Row d = _ Worksheets("ReportRequestXR").Cells.Find(What:="AC TXR2" & i & "_END", after:=Range("A1"), LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False).Row If ComboBox2XR.Value = "" Then ComboBox2XR.Enabled = True ComboBox2XR.Visible = True End If If ComboBox2XR.Value = "Encounter-Level" Then ComboBox2XR.Enabled = True Worksheets("ReportRequestXR").Rows(c & ":" & d).Hidden = xlVeryHidden ElseIf ComboBox2XR.Value = "Accession-Level" Then ComboBox2XR.Enabled = True Worksheets("ReportRequestXR").Rows(c & ":" & d).Visible = True End If End Sub The rows are not hiding as planned, any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a UserForm based on ComboBox selection | Excel Programming | |||
Populate Sheet based on ComboBox selection | Excel Programming | |||
How to populate a combobox based on selection from another combobo | Excel Programming | |||
VB Script based on combobox selection | Excel Programming | |||
Hide Rows based on Time Selection in timesheet. | Excel Programming |