![]() |
macro to all worksheets
hi
how to apply a single macro to all worksheets???????? |
macro to all worksheets
Sub allsheets()
Dim w As Worksheet For Each w In Worksheets w.Range("A1").Value = 1 Next End Sub is an example of doing something on all the worksheets in a workbook. -- Gary''s Student - gsnu2007d " wrote: hi how to apply a single macro to all worksheets???????? |
macro to all worksheets
Sub allshts()
For Each ws In ActiveWorkbook.Sheets MsgBox ws.Name Next ws End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software wrote in message ... hi how to apply a single macro to all worksheets???????? |
All times are GMT +1. The time now is 01:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com