|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
可以打开了
这样试试
Sub test()
i = tmp_rows
j = 1
'===============================================================
'浏览目录
spath = ""
Application.FileDialog(msoFileDialogFolderPicker).InitialFileName = spath
With Application.FileDialog(msoFileDialogFolderPicker)
.ButtonName = "确定"
If .Show = True Then
spath_tmp = .SelectedItems(1)
spath = .SelectedItems(1)
End If
End With
'==================================================================
Range("a1:j1").Merge
Cells(1, 1) = "文件夹名"
Cells(1, 11) = "文件名称"
Cells(1, 12) = "文件大小"
Cells(1, 13) = "类型"
Cells(1, 14) = "创建时间"
Cells(1, 15) = "修改时间"
ct_spath_tmp = spath
If Application.WorksheetFunction.CountIf(Sheet3.Range("B:B"), ct_spath_tmp) = 1 Then
MsgBox "已有该目录信息,将退出."
Exit Sub
End If
If spath = "" Then Exit Sub
Call 展开文件夹
Call 获得当前文件夹名
' spath = spath & "\"
spath = spath & "\*.xl*"
Call 获取当前文件名
Call getfolder(spath)
Call 设置目录线
End Sub |
评分
-
1
查看全部评分
-
|