軟體:excel
版本:office 365
想請教各位前輩,我想將多個開啟的檔案內容裡搜尋到HHH後移到右邊一格儲存格的值改
為000,請問各位前輩,我的VBA哪邊有錯,執行後,只會修改到最後一個檔案而已,其他
先
開起的檔案都沒有修改到,謝謝大家!
Dim wb as workbook
Dim ABC as range
For each wb in application.workbook
Set ABC = Activesheet.Cells.Find(What:="HHH",
LookIn:=xIFormulas2,
LookAt:=x1Part, SearchOrder: =xlByRows, SearchDirection: xINext,
MatchCase: =False, SearchFormat: =False)
ABC.Offset (, 1): Select
ActiveCell. FormulaR1C1 = "000"