以文本方式查看主题

-  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=68020)

--  作者:Bin
--  发布时间:2015/5/8 10:26:00
--  
tables("X").current.locked=true
--  作者:大红袍
--  发布时间:2015/5/8 10:35:00
--  

1、BeforeSelChanged事件

 

If e.NewRange.RowSel <> e.OldRange.RowSel Then
    If vars("锁定") = True Then
        e.cancel = True
    End If
End If

 

2、锁定操作

 

vars("锁定") = True

 

3、解锁操作

 

vars("锁定") = False


--  作者:Bin
--  发布时间:2015/5/8 10:38:00
--  

BeforeSelRangeChange


增加一个全局变量.判断然后执行E.Cancel=true


If vars("变量") = True Then
        e.cancel = True
    End If