seventy9mph
Board Regular
- Joined
- Apr 16, 2009
- Messages
- 72
I have excel 2007, when I try to run this in Excel 2003 I get this pop up error when I click on my option buttons (option buttons populate cell K5)
"Object doesn't support this property or method"
any help to solve this BIG problem?
"Object doesn't support this property or method"
any help to solve this BIG problem?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
On Error GoTo err_handle
Application.EnableEvents = False
ActiveSheet.Unprotect ("password")
Select Case Target.Address
Case "$D$8", "$D$10", "$D$12", "$H$8", "$H$10", "$K$5"
If Range("$K$5") = "ELEV2" Then
Range("$H$10") = Range("$M$8")
Range("H8,D12").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("H10").Interior.Color = 16777062
Range("D8").Select
'Range("H10").Locked = True
ElseIf Range("$K$5") = "STA2" Then
Range("$H$8") = Range("$M$8")
Range("H10,D12").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("H8").Interior.Color = 16777062
Range("D8").Select
ElseIf Range("$K$5") = "GRADE" Then
Range("$D$12") = Range("$M$8")
Range("H8,H10").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("D12").Interior.Color = 16777062
Range("D8").Select
End If
ActiveSheet.Protect ("password")
Case Else:
End Select
cleanup:
Application.EnableEvents = True
Exit Sub
err_handle:
MsgBox Err.Description
Resume cleanup
End Sub