怎么样实现不同工作簿中的相同工作表内容的同步更新?

1个回答

写回答

870609605

2026-01-26 20:40

+ 关注

VBA
VBA

只能用VBA来完成,提高悬赏分,在下面补全代码即可!Private Sub CommandButton1_Click() Dim strA As String, wb As Workbook, i As Long, n As Long strA = Dir(ThisWorkbook.Path & \*.xls) Do While strA For Each wb In Workbooks If wb.Name = strA Then GoTo wbnext Next Set wb = Workbooks.Open(ThisWorkbook.Path & \ & strA)wbnext: '处理数据 ??? '处理数据完成strADo: wb.Close True strA = Dir Loop End Sub

举报有用(0分享收藏

Copyright © 2025 IZhiDa.com All Rights Reserved.

知答 版权所有 粤ICP备2023042255号