Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you familiar with Worksheet grouping and its benefits?
Hold down the shift-key and clink First and Last sheet for contiguous or Hold down the Control-key and click individual sheets to be "grouped"... HTH wrote in message ... I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Warning: if you forget to ungroup the sheets, you may damage your data
beyond repair! Grouping should be used very, very carefully. -- Vasant "JMay" wrote in message news:Cbnec.20866$192.2827@lakeread06... Are you familiar with Worksheet grouping and its benefits? Hold down the shift-key and clink First and Last sheet for contiguous or Hold down the Control-key and click individual sheets to be "grouped"... HTH wrote in message ... I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I understand what your are sayinb by grouping and
ungrouping. But How can i implement this by vba??? Any help would be appreciated -----Original Message----- Are you familiar with Worksheet grouping and its benefits? Hold down the shift-key and clink First and Last sheet for contiguous or Hold down the Control-key and click individual sheets to be "grouped"... HTH wrote in message ... I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It would be useful for you to describe what processing you are doing to the
worksheets. -- Vasant wrote in message ... I understand what your are sayinb by grouping and ungrouping. But How can i implement this by vba??? Any help would be appreciated -----Original Message----- Are you familiar with Worksheet grouping and its benefits? Hold down the shift-key and clink First and Last sheet for contiguous or Hold down the Control-key and click individual sheets to be "grouped"... HTH wrote in message ... I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Grouping really isn't supported in VBA. Some things can be done by using
selection, but for the most part, it is advisable to loop through the sheets and repeat the action. -- Regards, Tom Ogilvy wrote in message ... I understand what your are sayinb by grouping and ungrouping. But How can i implement this by vba??? Any help would be appreciated -----Original Message----- Are you familiar with Worksheet grouping and its benefits? Hold down the shift-key and clink First and Last sheet for contiguous or Hold down the Control-key and click individual sheets to be "grouped"... HTH wrote in message ... I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks . |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Being VERY CAREFUL, if and only if the layout of the data on each
worksheet is the same then something along the lines of : Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select might be helpful. wrote: I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for the most part is isn't very helpful in VBA.
-- Regards, Tom Ogilvy "SmilingPolitely" wrote in message . au... Being VERY CAREFUL, if and only if the layout of the data on each worksheet is the same then something along the lines of : Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select might be helpful. wrote: I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I think you meant ... dim wks as worksheet for each wks in ActiveWorkbook.worksheets msgbox wks.name next But this is NOT simultnaeously but also processes one sheet after the other. -- Regards Frank Kabel Frankfurt, Germany wrote: I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like the following: Just make sure to ungroup the worksheets
before exiting the subroutine, regardless of any errors that occur during processing. Test thoroughly!!! Sub ProcessWorksheets() On Error Goto UngroupSheets 'Group the worksheets. Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Select ProcessGroupedWorksheets If exitFlag = True Then GoTo UngroupSheets Sheets("Sheet1").Select 'Other miscellaneous ungrouped processing here. UngroupSheets: Sheets("Sheet1").Select End Sub This will reduce the overall execution time somewhat, since you have eliminated repeating a lot of interpreted VBA code that probably takes 5% to 10% of the total time. A lot depends on how efficiently your code has been written (minimization of loops, dot operations, common expressions inside loops, use of pre-calculated constants in place of inline variables, use of non-Variant variables, good algorithms, etc.) -- Regards, Bill wrote in message ... I want to perform similar operation in 5-6 sheets of a workbook. I am currently following the proces as : For i = 1 To ActiveWorkbook.Worksheets.Count processEachWorksheet If exitFlag = True Then Exit Sub Next i ie. I am doing a similar process 5-6 times. Can it be possible that I i do the processing for each sheet at the same time? Is something like this possible: For each sheet... 'do this If possible will it make any difference in the total time taken? Thanks |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See the Microsoft KB articles that are related to this thread:
"XL2000: Macro Doesn't Function on Multiple Sheets in Group Mode" http://support.microsoft.com/default...31&Product=xlw "Macro Doesn't Function on Multiple Sheets in Group Mode" http://support.microsoft.com/default...NoWebContent=1 Also search for "Multiple Sheets in Group Mode" for additional articles and information. -- Regards, Bill |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See the Microsoft KB articles that are related to this thread:
"XL2000: Macro Doesn't Function on Multiple Sheets in Group Mode" http://support.microsoft.com/default...31&Product=xlw "Macro Doesn't Function on Multiple Sheets in Group Mode" http://support.microsoft.com/default...NoWebContent=1 Also search for "Multiple Sheets in Group Mode" for additional articles and information. -- Regards, Bill |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See the Microsoft KB articles that are related to this thread:
"XL2000: Macro Doesn't Function on Multiple Sheets in Group Mode" http://support.microsoft.com/default...31&Product=xlw "Macro Doesn't Function on Multiple Sheets in Group Mode" http://support.microsoft.com/default...NoWebContent=1 Also search for "Multiple Sheets in Group Mode" for additional articles and information. -- Regards, Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modifying several worksheets simultaneously | Excel Worksheet Functions | |||
Display 2 worksheets simultaneously | Excel Worksheet Functions | |||
Add a Row to Multiple Worksheets Simultaneously | Excel Worksheet Functions | |||
Updating Multiple Worksheets Simultaneously | Excel Discussion (Misc queries) | |||
View worksheets simultaneously | Excel Discussion (Misc queries) |