excell 2007 macro validate data entered into cell and show msgbox if incorrect
问题 Please can someone help with the following code. it gives me an error at the following line: Set range = "C5:L14" This is the complete code: Private Sub Worksheet_Change(ByVal Target As Excel.range) Dim ws As Worksheet Dim range As Worksheet Set ws = Application.ActiveSheet Set range = "C5:L14" If Not Application.Intersect(Target, range("C5:L14")) Is Nothing Then If range("C5:L14").Value = "" Then Exit Sub If range("C5:L14").Date = "< today()" Then Exit Sub If range("C5:L14").Date = "> today(