D
Derrick
error: Unable to set the Hidden Property of the Range Class
code:
under Worksheet, Change.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B3")) Is Nothing Then Exit Sub
Rows("6:47").EntireRow.Hidden = False
Range("F10") = "=F7*F9"
Range("F15") = "=F9-F30-F44"
Range("F16") = "=F7-F31-F45"
Range("D2,C6,D6,C7,D7,C8,D8,C9,D9,C14,F17,F18") = 0
Range("C25,F30,F31,F32,F33,F44,F45,F46,F47") = 0
If Range("B3") = "Standardized Module Width" Then
Rows("6:6").EntireRow.Hidden = False
:
Rows("47:47").EntireRow.Hidden = False
Range("C8,D8") = 0
Range("F10") = "=F6*F9"
:
Range("F47") = 0
ElseIf Range("B3") = "Standardized Module Height" Then
Rows("6:6").EntireRow.Hidden = True
:
Rows("47:47").EntireRow.Hidden = True
Range("C6,D6") = 0
Range("F10") = "=F7*F8"
Range("F15") = "=IF((F8+SUMMARY!E6)=F9,F9,F8)"
:
Range("F47") = "=IF((F8+SUMMARY!E6=F9),2,1)"
ElseIf Range("B3") = "Non-Modular Frame" Then
Rows("6:6").EntireRow.Hidden = True
Rows("8:8").EntireRow.Hidden = True
Rows("10:10").EntireRow.Hidden = True
Rows("15:47").EntireRow.Hidden = False
Range("C6,D6") = 0
Range("C8,D8") = 0
Range("F10") = "=F7*F9"
Range("F15") = "=F9-F30-F44"
Range("F16") = "=F7-F31-F45"
Range("F17,F18,F30,F31,F32,F33,F44,F45,F46,F47") = 0
End If
End Sub
when Debugging, The highligted row is the "Rows("6:47").EntireRow.Hidden =
False"
when i delete that row, it goes to the next .entirerow.hidden = true/false
code.
this problem started when i copied my template sheet (which used this code)
to make dupicates of the template. now none work.
code:
under Worksheet, Change.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B3")) Is Nothing Then Exit Sub
Rows("6:47").EntireRow.Hidden = False
Range("F10") = "=F7*F9"
Range("F15") = "=F9-F30-F44"
Range("F16") = "=F7-F31-F45"
Range("D2,C6,D6,C7,D7,C8,D8,C9,D9,C14,F17,F18") = 0
Range("C25,F30,F31,F32,F33,F44,F45,F46,F47") = 0
If Range("B3") = "Standardized Module Width" Then
Rows("6:6").EntireRow.Hidden = False
:
Rows("47:47").EntireRow.Hidden = False
Range("C8,D8") = 0
Range("F10") = "=F6*F9"
:
Range("F47") = 0
ElseIf Range("B3") = "Standardized Module Height" Then
Rows("6:6").EntireRow.Hidden = True
:
Rows("47:47").EntireRow.Hidden = True
Range("C6,D6") = 0
Range("F10") = "=F7*F8"
Range("F15") = "=IF((F8+SUMMARY!E6)=F9,F9,F8)"
:
Range("F47") = "=IF((F8+SUMMARY!E6=F9),2,1)"
ElseIf Range("B3") = "Non-Modular Frame" Then
Rows("6:6").EntireRow.Hidden = True
Rows("8:8").EntireRow.Hidden = True
Rows("10:10").EntireRow.Hidden = True
Rows("15:47").EntireRow.Hidden = False
Range("C6,D6") = 0
Range("C8,D8") = 0
Range("F10") = "=F7*F9"
Range("F15") = "=F9-F30-F44"
Range("F16") = "=F7-F31-F45"
Range("F17,F18,F30,F31,F32,F33,F44,F45,F46,F47") = 0
End If
End Sub
when Debugging, The highligted row is the "Rows("6:47").EntireRow.Hidden =
False"
when i delete that row, it goes to the next .entirerow.hidden = true/false
code.
this problem started when i copied my template sheet (which used this code)
to make dupicates of the template. now none work.