Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you for your help Gary
Monika "Gary''s Student" wrote: Say we have a macro that does stuff on a single sheet (the ActiveSheet) Sub SingleSheet() ActiveSheet.Range("A1").Value = "hello world" End Sub We want this done on ALL sheets. So we use a loop: Sub AllTheSheets() Dim s As Worksheet For Each s In Worksheets s.Range("A1").Value = "hello world" Next End Sub -- Gary''s Student - gsnu200844 "murkaboris" wrote: Hello: I have a macro in a workbook that I've created on the first worksheet. I have 11 worksheets in the workbook and the same macro needs to run on each worksheet. Is there a way to do it automatically in the original macro or do I have to run it every time separately on each worksheet. Please help. Thank you. Monika |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combine worksheets in multiple workbook in one workbook with a macro | Excel Discussion (Misc queries) | |||
Apply Macro to all worksheets in a workbook except one | Excel Discussion (Misc queries) | |||
automatically apply a macro to all worksheets | Excel Discussion (Misc queries) | |||
Excel should apply names in all worksheets of a workbook | Excel Discussion (Misc queries) | |||
apply cell names to formulas in multiple worksheets | Excel Worksheet Functions |