,欢迎访问网页设计爱好者web开发。 private sub command1_click() dim shellapp, opanel, folderitem1, folderitem2, oitem set shellapp = createobject("shell.application") set opanel = shellapp.namespace(0)
set folderitem2 = nothing for each folderitem1 in opanel.items if folderitem1.name = "我的电脑" then set folderitem2 = folderitem1.getfolder: exit for end if debug.print folderitem1.name next
if folderitem2 is nothing then msgbox "找不到项目!" exit sub end if
set oitem = nothing for each oitem in folderitem2.items debug.print oitem.name next end sub