timesareGMT
New Member
- Joined
- Aug 19, 2011
- Messages
- 26
Hi all,
I set up the VBA codes as below:
Sub AGG_CEM()
Select Case Trim(Range("e6").Value)
Case "Present"
Rows("12:24").Hidden = False
Rows("25:48").Hidden = True
Case "Absent"
Rows("12:24").Hidden = True
Rows("25:48").Hidden = False
Case Else
Rows("19:48").Hidden = False
End Select
End Sub
I plan to set it run automatically by the combo box selection, but actually it fails and I need to press ALT+F8 to get it work.
What was going wrong?
Thanks.
I set up the VBA codes as below:
Sub AGG_CEM()
Select Case Trim(Range("e6").Value)
Case "Present"
Rows("12:24").Hidden = False
Rows("25:48").Hidden = True
Case "Absent"
Rows("12:24").Hidden = True
Rows("25:48").Hidden = False
Case Else
Rows("19:48").Hidden = False
End Select
End Sub
I plan to set it run automatically by the combo box selection, but actually it fails and I need to press ALT+F8 to get it work.
What was going wrong?
Thanks.