Hi, hope someone could help me with my code. When workbook first open, all fields are blank, the user be able to have selection options in H10 (Tier1, Tier 2, Tier 3, Tier 4).
let's say the user first select Tier 1 in H10, they are also have 3 options to be chosen in Program Type H13. however, if the user choose Tier 3 or 4, i set default to RT - No Insurance, so far, it is working fine. However, if the user change their mind and would like to switch H10 to either Tier 1 or 2 the default will remain in H13.
my question, how can i make the H13 to clear when the user decided to chose either Tier 1 or 2 from Tier 3 or 4 and be able also have the options to choose in the drop down list (3 options).
I was able to set H13 to clear the content, however whatever they selected in H13 will also be cleared out.
Hope someone could help asap!
let's say the user first select Tier 1 in H10, they are also have 3 options to be chosen in Program Type H13. however, if the user choose Tier 3 or 4, i set default to RT - No Insurance, so far, it is working fine. However, if the user change their mind and would like to switch H10 to either Tier 1 or 2 the default will remain in H13.
my question, how can i make the H13 to clear when the user decided to chose either Tier 1 or 2 from Tier 3 or 4 and be able also have the options to choose in the drop down list (3 options).
I was able to set H13 to clear the content, however whatever they selected in H13 will also be cleared out.
Hope someone could help asap!
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Static a As Boolean
Dim myPassword As String
myPassword = "xxxxxxx"
ActiveSheet.Unprotect Password:="xxxxxxxxx"
'MsgBox a
'MsgBox "start"
'Tier 1 No Re'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Range("H10").Value = "Tier 1" And Range("H13").Value = "RT - No Reinsurance" Then
Range("H28:H29").Locked = False
Range("K10:l23").Locked = False
Range("K25:l26").Locked = False
Range("H13").Locked = False
Range("K24:L24").Locked = True
a = False
Rows("39:45").EntireRow.Hidden = True
Range("H13").Value = ""
'Tier 1 With Re'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf Range("H10").Value = "Tier 1" And Range("H13").Value = "RT - With Reinsurance (with Co-Insurance and/or AIG Fronted / Net-Line)" Then
Rows("39:45").EntireRow.Hidden = False
Range("H28:H29").Locked = False
Range("K10:l23").Locked = False
Range("K25:l26").Locked = False
Range("H13").Locked = False
Range("K24:L24").Locked = True
a = False
Range("H13").Value = ""
'Tier 1 With Re'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf Range("H10").Value = "Tier 1" And Range("H13").Value = "RT - With Reinsurance" Then
Rows("39:45").EntireRow.Hidden = True
Range("H28:H29").Locked = False
Range("K10:l23").Locked = False
Range("K25:l26").Locked = False
Range("H13").Locked = False
Range("K24:L24").Locked = False
a = False
Range("H13").Value = ""
'Tier 2 No Re'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf Range("H10").Value = "Tier 2" And Range("H13").Value = "RT - No Reinsurance" Then
Range("H28:H29").Locked = False
Range("K10:l23").Locked = False
Range("K25:l26").Locked = False
Range("H13").Locked = False
Range("K24:L24").Locked = True
a = False
Rows("39:45").EntireRow.Hidden = True
Range("H13").Value = ""
'Tier 2 With Re'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf Range("H10").Value = "Tier 2" And Range("H13").Value = "RT - With Reinsurance (with Co-Insurance and/or AIG Fronted / Net-Line)" Then
Rows("39:45").EntireRow.Hidden = False
Range("H28:H29").Locked = False
Range("K10:l23").Locked = False
Range("K25:l26").Locked = False
Range("H13").Locked = False
Range("K24:L24").Locked = False
a = False
Range("H13").Value = ""
'Tier 2 With Re'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf Range("H10").Value = "Tier 2" And Range("H13").Value = "RT - With Reinsurance" Then
Range("H28:H29").Locked = False
Range("K10:l23").Locked = False
Range("K25:l26").Locked = False
Range("H13").Locked = False
Range("K24:L24").Locked = False
a = False
Rows("39:45").EntireRow.Hidden = True
Range("H13").Value = ""
'Teir 3/4'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf Range("H10").Value = "Tier 3" And a = False Then
a = True
Range("H28:H29").Locked = True
Range("K10:l23").Locked = True
Range("K25:l26").Locked = True
Range("K24:L24").Locked = True
Rows("39:45").EntireRow.Hidden = True
Range("H13").Value = "RT - No Reinsurance"
'Range("H13").Locked = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ElseIf Range("H10").Value = "Tier 4" And a = False Then
a = True
Range("H28:H29").Locked = True
Range("K10:l23").Locked = True
Range("K25:l26").Locked = True
Range("K24:L24").Locked = True
Rows("39:45").EntireRow.Hidden = True
Range("H13").Value = "RT - No Reinsurance"
'Range("H13").Locked = False
End If
Last edited by a moderator: