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
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter