以文本方式查看主题

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

--  作者:weibu
--  发布时间:2021/7/16 16:49:00
--  插入行
Insertnew  老师插入行都是在选择行的上面插入。能否实现在选择行的下面插入行
--  作者:有点蓝
--  发布时间:2021/7/16 16:54:00
--  
那就选择下面那行再插入不就行了。比如

dim r as row = tables("A").current
if r.index = tables("A").rows.count - 1 then 如果选择的是最后一行直接新增
tables("A").addnew
else
tables("A").position = r.index+1 \'否则选择下一行
tables("A").Insertnew  
endif