思路错了,不能这样写代码。如果是想阻止删除,就直接写
If Tables("出库").count > 100 ' 出库表实际没有100行哦... e.Cancel = TrueEnd If
每删除一行之前都会触发这儿事件的。