Views

Histats

Vitrine

VBA Excel - Loop por todas as worksheets

Ok, isso é o básico, mas é válido, especialmente para iniciantes.

  Sub SheetsWrap()
    Dim iSheet as Long

    Let Application.ScreenUpdating = False

    For iSheet = 1 To ActiveWorkbook.WorkSheets.Count
     Let WorkSheets(iSheet).cells(1,1) = "'" & WorkSheets(iSheet).name
    Next iSheet

    Let Application.ScreenUpdating = True
  End Sub



Tags: Excel, loop, wrap, worksheets, sheets, ws


André Luiz Bernardes
A&A® - Work smart, not hard.

✔ VBA Brazil®

✔ VBA Brazil®
brazilsalesforceeffectiveness@gmail.com
Related Posts Plugin for WordPress, Blogger...
diHITT - Notícias