Public Sub PickFolder()
Dim dd As New BL, pt$, fi$, sh As Worksheet
Application.ScreenUpdating = False
pt = ThisWorkbook.Path & "\表格": fi = "*.xls*"
brr = [j4].CurrentRegion: arr = dd.wj(pt, fi)
Do While arr(n + 1, 1) <> ""
n = n + 1
With Workbooks.Open(arr(n, 1))
For Each sh In .Sheets
For i = 3 To UBound(brr)
If sh.Name = brr(i, 1) Then
sh.Range(brr(i, 2)) = brr(i, 3)
End If
Next
Next
.Close True
End With
Loop
Application.ScreenUpdating = True
MsgBox "OK!"
End Sub
复制代码