以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  请问,如何在某一列单元格中,禁止使用快捷键Control+V(粘贴)和Delete键?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=73364)

--  作者:大红袍
--  发布时间:2015/8/18 11:00:00
--  

KeyDown事件

 

If e.Control = True AndAlso e.KeyCode=Keys.V Then
    vars("粘贴") = True
Else
    vars("粘贴") = False
   
End If

 

KeyPressEdit事件

 

If vars("粘贴") Then
    e.cancel = True
End If