I have a file in which I'm working on where I would like to hide a number of rows based on a selcetion from an inbedded drop down menu. The selection I'm concerned about is the fifth selection in a list of five. The macro I'm using is shown below:
Sub HideRows Worksheet_Change(ByVal Target As Range)<o
></o
>
If Target.Cells.Count = 1 And Target.Address = "$C$10" Then<o
></o
>
<o
></o
>
If LCase(Target.Value) = "Military" Then<o
></o
>
Rows("13:60").EntireRow.Hidden = True<o
></o
>
<o
> </o
>
Else<o
></o
>
Rows("13:60").EntireRow.Hidden = False<o
></o
>
End If<o
></o
>
<o
></o
>
End If<o
></o
>
End Sub<o
></o
>
<o
> </o
>
End Sub
When I remove the 2nd statement of "End Sub" i get an error message on the first row when I try to debug it.
I am an absolute novice when it comes to VBA.
Sub HideRows Worksheet_Change(ByVal Target As Range)<o
If Target.Cells.Count = 1 And Target.Address = "$C$10" Then<o
<o
If LCase(Target.Value) = "Military" Then<o
Rows("13:60").EntireRow.Hidden = True<o
<o
Else<o
Rows("13:60").EntireRow.Hidden = False<o
End If<o
<o
End If<o
End Sub<o
<o
End Sub
When I remove the 2nd statement of "End Sub" i get an error message on the first row when I try to debug it.
I am an absolute novice when it comes to VBA.