Loop Through All Currently Open Workbooks And Modify Them

PHOTO EMBED

Mon May 06 2024 22:04:55 GMT+0000 (Coordinated Universal Time)

Saved by @acassell

Sub LoopEachOpenWorkbook()

'PURPOSE: Add today's date into every currently open Excel workbook
'SOURCE: www.TheSpreadsheetGuru.com

Dim wb As Workbook

For Each wb In Application.Workbooks
  If wb.Name <> "PERSONAL.xlsb" Then
    
    'Add today's date to cell A1 of first worksheet in workbook
      wb.Worksheets(1).Range("A1") = Date
  
  End If
Next wb

End Sub
content_copyCOPY

https://www.thespreadsheetguru.com/loop-open-workbooks-and-modify/