vb刪除某一行哪裡錯了

時間 2022-06-13 10:20:04

1樓:

listview1.items.remove(listview1.

items.itemi1).index) 這句裡面 少了個左括號 ,應該是listview1.

items.remove(listview1.items.

item(i1).index)

應該是listview1.items.remove(listview1.items.item(i1))

還有i1應該是 listview1.items.count-1 to 0

如果還有錯那麼設定 listview1的checkboxes屬性為true 或者將if listview1.items.item(i1).

checked要改為if listview1.items.item(i1).

selected

2樓:匿名使用者

dim i1 as integer

for i1 = listview1.items.count to 1 step -1

if listview1.items.item(i1).checked = true then

listview1.items.remove(listview1.items.item(i1))

end if

next

3樓:匿名使用者

'這樣測試通過

dim i1 as integer

for i1 = listview1.listitems.count to 1 step -1

if listview1.listitems.item(i1).checked = true then

listview1.listitems.remove listview1.listitems.item(i1).index

end if

next

Sql中刪除同一行資料 根據某一列

delete from tb where id not in select b.id from select distinct first value id over partition by name as id,name from tb b delete tb where id not in s...

linux 中可以用cut提取某一行的某一列資料嗎如果可

小米飛貓 可以。cut d f2 filename意思就是我以空格為列的分隔符,提取第二列 或者使用awk awk filename awk預設以空格為分隔符,列印第二列 南京學而思it專用 用sed的方法是sed n n,np awk 第2個與第3個n表示你要列印第幾行,比如要列印5 8行就是se...

關於excel單元行上色的問題?選中某一行,點選填充,顏色是無限填充的,如何界定到某一列後就不再填充了

如果你是用整行選定的方式進行填充,那麼就不可能說只界定到某一列,因為你本身使用的選中方法就是針對整行的。只能用非整行選定的方法來選擇單元格區域。另外,用shift 整列選中加ctrl 的方式,就可以很快將某列後面的所有列一下子選中,這樣,再取消填充顏色就行了。你不要選中行號,進行填充。比如第三行,你...