这段代码执行怎么老蓝屏。是不是占内存太大?
ctListPhoto.ClearList '清除LIST内容。
For i = 0 To ctListProc.ListCount - 1
If ctListProc.CellCheck(i, 5) = 1 Then
Set objFolder = FSO.GetFolder(ctListProc.CellText(i, 6))
Set objFile = objFolder.Files
For Each objFile In objFile
ctListPhoto.AddItem ctListProc.CellText(i, 6) & "\" & objFile.name + Chr(10) + objFile.name
Next
Set objFolder = Nothing
Set ojbFile = Nothing
End If
Next
[解决办法]
ctListPhoto
ctListProc
这两个是什么控件?.net代码?
[解决办法]
那个for each里面做两个试验
1、ctListPhoto.AddItem 这行注释掉。如果不黑屏说明出在这个循环里。
2、这个循环里面加一行 doevents