Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Application.Intersect(Target, Range("F10:M26,D2")) Is Nothing Then MsgBox ("禁止粘贴内容!,请双击后输入内容!") Application.CellDragAndDrop = False Else Application.CellDragAndDrop = True End If End Sub Private Sub Worksheet_Deactivate() Application.CellDragAndDrop = True End Sub
注意:Range("F10:M26,D2") 为指定的禁止粘贴的区域。只能手动输入。