代码:
Sub Find()
Application.ScreenUpdating = False
Dim MyDir As String
MyDir = ThisWorkbook.Path &"\"
ChDrive Left(MyDir, 1) 'find all the excelfiles
ChDir MyDir
Match = Dir$("")
Do
If Not LCase(Match) =LCase(ThisWorkbook.Name) Then
Workbooks.Open Match, 0 'open
Worksheets("sheet1").range("B5") = 20
ActiveWindow.Close 1
Match = Dir$
End If
Loop Until Len(Match) = 0
Application.ScreenUpdating = True
End Sub
自己啥也不会,自己在网上拼的代码,运行卡死,必须任务管理干掉。希望有人帮我修改下,需求是,批量修改工作簿制定Sheet指定单元格数据。有大量的工作簿是相同的模板。
Sub Find()
Application.ScreenUpdating = False
Dim MyDir As String
MyDir = ThisWorkbook.Path &"\"
ChDrive Left(MyDir, 1) 'find all the excelfiles
ChDir MyDir
Match = Dir$("")
Do
If Not LCase(Match) =LCase(ThisWorkbook.Name) Then
Workbooks.Open Match, 0 'open
Worksheets("sheet1").range("B5") = 20
ActiveWindow.Close 1
Match = Dir$
End If
Loop Until Len(Match) = 0
Application.ScreenUpdating = True
End Sub
自己啥也不会,自己在网上拼的代码,运行卡死,必须任务管理干掉。希望有人帮我修改下,需求是,批量修改工作簿制定Sheet指定单元格数据。有大量的工作簿是相同的模板。