|
楼主 |
发表于 2024-3-4 17:26
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub DownloadFile()
Dim Rng As Range
Dim i As Integer
Dim c As Integer
c = ActiveWorkbook.Worksheets.Count
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show Then Path$ = .SelectedItems(1) & "\" Else Exit Sub
End With
For i = 1 To c
For Each Rng In ActiveWorkbook.Worksheets(i).UsedRange.SpecialCells(xlCellTypeFormulas)
If InStr(1, Rng.Formula, "[") > 0 Then
FileCopy Replace(Mid(Split(Rng.Formula, "]")(0), 3), "[", ""), Path & Split(Mid(Split(Rng.Formula, "]")(0), 3), "[")(1)
End If
Next
Next
MsgBox "文件下载完成"
End Sub
改了下,但似乎运行不了,请大侠赐教。 |
|