How to Loop Through All Open Workbooks in Excel VBA (Macro) - Code Included

Опубликовано: 02 Октябрь 2024
на канале: EverydayVBA
3,555
23

Grab the Free VBA Quick Reference Guide
https://chrisjterrell.com/p/getting-s...
In this video we will Loop through all the open workbooks. We will do this using the for each next loop and will loop through ever workbook within the workbooks object.

Code:
==============
Sub WBLoop()

Dim w As Workbook

For Each w In Workbooks
w.Activate
Debug.Print w.Name
Next
End Sub