如果还有Sheet6、7、8等等,那这段代码岂不是要一匹布那么长?请求高手出招,解决疑难……作者: ni57 时间: 2009-7-11 12:15
Sub Macro2()
dim sh as worksheet
Workbooks.Open ThisWorkbook.Path & "\源表.xls"
for each sh in worksheets
with sh
.Cells.Replace "张萍", "张平"
.Cells.Replace "李 四", "李四"
.Cells.Replace " 赵五 ", "赵五"
.Range("A1").Select
end with
next
ActiveWorkbook.Save
End Sub