|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
- Sub 按钮1_Click()
- Dim iRow, i
- Dim savePath
- savePath = ThisWorkbook.Path & ""
- iRow = Cells(Rows.Count, 2).End(xlUp).Row
- For i = 2 To iRow
- URLDownloadToFile 0, Cells(i, 2), savePath & Cells(i, 3).Value, 0, 0
- Next
- MsgBox "OK"
- End Sub
复制代码 未测试,自己测试下 |
评分
-
2
查看全部评分
-
|