Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I have this line of code, part of an If/Else/Endif process
The line in red leaves me with an error: "Object doesn't support this property or method."
Variable 'segtar' declared as range and equals the target range. The worksheet in unprotected.
VBA Code:
If Not Intersect(Target, .Range("E" & rwend + 2 & ":E" & rwend + 5)) Is Nothing Then
MsgBox segtar.Address
With ws_form
.Unprotect
If segtar.Cells.Interior.indexcolor = xlNone Then
segtar.Cells.Interior.Color = ccgreen
segtar.Cells.Font.Color = RGB(0, 32, 96)
RemoveCellSelectionBox
Else
Target.Interior.Color = ccgreen
Target.Font.Color = RGB(0, 32, 96)
RemoveCellSelectionBox
End If
.Protect
End With
End If
The line in red leaves me with an error: "Object doesn't support this property or method."
Variable 'segtar' declared as range and equals the target range. The worksheet in unprotected.