Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
Consider this piece of code...
The line highlighted in red is giving me an error: "Application-defined or object defined error".
Is anyone able to isolate the problem and suggest a resolution.
Note, the worksheet is protected, but the cell is unlocked (there are no issues with applying the value to the same cell). Cell M1 is a merged cell, but even when I try to unmerge I get the same error.
Rich (BB code):
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
'check for valid date
If IsDate(KeyCells.Value) = False Then
mbevents = False
ws_master.Range("M1").Value = "Enter valid date (month/day)"
ws_master.Range("M1").Font.Color = RGB(192, 57, 43)
mbevents = True
End If
Exit Sub
End If
The line highlighted in red is giving me an error: "Application-defined or object defined error".
Is anyone able to isolate the problem and suggest a resolution.
Note, the worksheet is protected, but the cell is unlocked (there are no issues with applying the value to the same cell). Cell M1 is a merged cell, but even when I try to unmerge I get the same error.
Code:
ws_master.Range("M1").unmerge