Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running Macro on every sheet in Workbook !!!
I have a Sub called ColHidden() which i want to run on every workshee
in Workbook "ClearOrClosedSent.xls". The Worksheets will have different names however. Can anyone please tell me how to apply the Sub on all worksheets in th afforementioned workbook? I am using Excel 2000. TI -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running Macro on every sheet in Workbook !!!
Hi
try something like sub all_sheets() dim wks as worksheet for each wks in worksheets wks.column(1).hidden=true next end sub -- Regards Frank Kabel Frankfurt, Germany I have a Sub called ColHidden() which i want to run on every worksheet in Workbook "ClearOrClosedSent.xls". The Worksheets will have different names however. Can anyone please tell me how to apply the Sub on all worksheets in the afforementioned workbook? I am using Excel 2000. TIA --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running Macro on every sheet in Workbook !!!
Thanks for the reply.
Trouble is i want to Hide various columns A,F,K,L etc and also i want to possibly add Column headings so i really want th flexibility of just calling a Subroutine as mentioned to run on ever sheet, but to be able to chop and change to the Subroutine itself. Any ideas?? Thanks agai -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running Macro on every sheet in Workbook !!!
sub all_sheets()
dim wks as worksheet for each wks in worksheets ChopAndChange wks next end sub Sub ChopAndChange(wks as Worksheet) wks.Columns("A:A,F:F,K:L").Hidden = True wks.Cells(1,2).Resize(1,4).Value =Array("HeaderB", _ "HeaderC","HeaderD","HeaderE") End sub -- Regards, Tom Ogilvy "Jako " wrote in message ... Thanks for the reply. Trouble is i want to Hide various columns A,F,K,L etc and also i want to possibly add Column headings so i really want the flexibility of just calling a Subroutine as mentioned to run on every sheet, but to be able to chop and change to the Subroutine itself. Any ideas?? Thanks again --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running Macro on every sheet in Workbook !!!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running macro in another workbook | Excel Worksheet Functions | |||
Help:Running a macro in one excel workbook from another workbook | Setting up and Configuration of Excel | |||
Running a macro in another workbook | Excel Programming | |||
Running a macro in another workbook | Excel Programming | |||
Running Code on Each Sheet in an Excel Workbook | Excel Programming |