现定义一个够大的二维数组(因为多维数组的话只有最后一维才支持redim) 然后用循环将内容加入sub LoadListViewdata() if listview1.listitems.count<1 then exit subdim arrContents(1000,1000) as string dim i as integer dim j as integerfor i=1 to listview1.listitems.count arrcontents(i,1)=listview1.listitems(i) for j=1 to listview1.listitems(i).subitems.count arrcontents(i,j+1)=listview1.listitems(i).subitems(j) next j next iend sub我没有在vb中check,但大体应该是这样的,你可以试试看 :)
然后用循环将内容加入sub LoadListViewdata()
if listview1.listitems.count<1 then exit subdim arrContents(1000,1000) as string
dim i as integer
dim j as integerfor i=1 to listview1.listitems.count
arrcontents(i,1)=listview1.listitems(i)
for j=1 to listview1.listitems(i).subitems.count
arrcontents(i,j+1)=listview1.listitems(i).subitems(j)
next j
next iend sub我没有在vb中check,但大体应该是这样的,你可以试试看 :)