ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cycle thru worksheets in a workbook (https://www.excelbanter.com/excel-programming/304713-cycle-thru-worksheets-workbook.html)

June

Cycle thru worksheets in a workbook
 
How do I bring each sheet in a workbook to Active? I have
a formatting macro I need to run on each sheet.

Thanks in advance!
June

Ken Macksey

Cycle thru worksheets in a workbook
 
Hi

you couls try something like



Dim ws As Worksheet

Application.ScreenUpdating = False

For Each ws In Worksheets
ws.Activate

' do your formatting here

Next ws

Sheets(1).Activate

Application.ScreenUpdating = True


HTH

Ken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.718 / Virus Database: 474 - Release Date: 09/07/2004




All times are GMT +1. The time now is 10:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com