以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  怎么禁止编辑单元格代码该怎么写  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=67770)

--  作者:jinzhengbe
--  发布时间:2015/5/1 19:38:00
--  怎么禁止编辑单元格代码该怎么写

If e.Row.IsNull("name") = False Then
 禁止编辑 单元格(“e”)

End If


--  作者:程兴刚
--  发布时间:2015/5/1 19:55:00
--  

PrepareEdit事件代码:假定第一列不为空时禁止编辑代码为:

 

If e.Col.name = "第一列"
    If e.Row.IsNull("第一列") = False Then
        e.Cancel = True
    End If
End If


--  作者:jinzhengbe
--  发布时间:2015/5/1 21:19:00
--  
搞定非常感谢