Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim SelRng As Range
With Target
Set SelRng = Intersect(Range("點餐區"), .Cells)
If SelRng Is Nothing Then Exit Sub
If SelRng.Address = .Address Then
MsgBox "選取區在範圍區內! "
Else
MsgBox "選取區包含範圍區外! "
End If
End With
End Sub作者: blue2263 時間: 2020-4-24 10:43