Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Open all the workbooks, and then run code like
Dim WB As Workbook For Each WB In Workbooks WB.Activate ' call your macro here Next WB -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "davidoo2005" wrote in message ... I have some 2000 books that each contain one data table to process. Is there any way to automate a macro to process these books without individually running the macro for each book? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. How can I exclude personal.xls from the for loop?
"Chip Pearson" wrote: Open all the workbooks, and then run code like Dim WB As Workbook For Each WB In Workbooks WB.Activate ' call your macro here Next WB -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "davidoo2005" wrote in message ... I have some 2000 books that each contain one data table to process. Is there any way to automate a macro to process these books without individually running the macro for each book? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim WB As Workbook
For Each WB In Workbooks if lcase(wb.name) < "personal.xls" then WB.Activate ' call your macro here end if Next WB davidoo2005 wrote: Thanks. How can I exclude personal.xls from the for loop? "Chip Pearson" wrote: Open all the workbooks, and then run code like Dim WB As Workbook For Each WB In Workbooks WB.Activate ' call your macro here Next WB -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "davidoo2005" wrote in message ... I have some 2000 books that each contain one data table to process. Is there any way to automate a macro to process these books without individually running the macro for each book? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Syntax error while applying a formula in a macro | Excel Discussion (Misc queries) | |||
Applying a macro to a command button, Excel 2002 | Excel Discussion (Misc queries) | |||
Applying a macro to all worksheets | Excel Discussion (Misc queries) | |||
Applying same macro to all worksheets in workbook | Excel Discussion (Misc queries) | |||
Applying Macro to all workbooks... | Excel Programming |