hi there.
i am making a form in excel.
and one of the entries is "number of server" - this can be 0 1 2 3.
When 0 is selected I want the successive rows of "Server1", "Server2" and "Server3" hidden.
When 1 is selected, I will see only "Server1" and so on.
I have no background in Excel or VB programming and below is what I could gather from the web.
there is another cell on which another 2 rows are hidden, so thats the first 3 lines of the code.
remaining code is for detecting C10 value which is what i am looking for now.
any help will be appreciated.
thanks
i am making a form in excel.
and one of the entries is "number of server" - this can be 0 1 2 3.
When 0 is selected I want the successive rows of "Server1", "Server2" and "Server3" hidden.
When 1 is selected, I will see only "Server1" and so on.
I have no background in Excel or VB programming and below is what I could gather from the web.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C17")) Is Nothing Then _
Rows("18:19").Hidden = Not (Range("C17") = "Yes")
If Not Intersect(Target, Range("C10")) Is Nothing Then _
Rows("11:13").Hidden = (Range("C10") = "0")
If Not Intersect(Target, Range("C10")) Is Nothing Then _
Rows("11:11").Hidden = Not (Range("C10") = "1")
If Not Intersect(Target, Range("C10")) Is Nothing Then _
Rows("13:13").Hidden = (Range("C10") = "2")
End Sub
there is another cell on which another 2 rows are hidden, so thats the first 3 lines of the code.
remaining code is for detecting C10 value which is what i am looking for now.
any help will be appreciated.
thanks