Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
subalterne sub in parallel
hello all..!!
at 19.43 my main sub launch a close A sub that closes all the pages that begin with letter A. the problem is that these pages are many, and the closing process takes 20-30 seconds... and the subalterne sub must be ended before the main sub can prosecute... jumping many calculations cycles is there a way to indicate to excel that the subalterne sub must be executed in parallel ??? ty all |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
subalterne sub in parallel
On Jul 15, 4:59*am, pls123 wrote:
hello all..!! at 19.43 *my main sub launch a close A * sub that closes all the pages that begin with letter A. the problem is that these pages are many, and the closing process takes 20-30 seconds... and the subalterne sub must be ended before the main sub can prosecute... jumping many *calculations cycles is there a way to indicate to excel that the subalterne sub must be executed in parallel * ??? *ty all pls123, In terms of "speed" you may want to consider setting ScreenUpdating to FALSE and Calculation to xlCalculationManual (reset if necessary at the end of the procedure). You can also set DisplayAlerts to FALSE to avoid from having the sheet deletion dialog box from prompting the user (reset after each sheet deletion). I'm not sure that I follow your order of events, i.e. delete a sheet, run the second procedure, go to the next sheet, delete the sheet, run the seond procedure, etc. Best, Matthew Herbert |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
subalterne sub in parallel
hi matthew !! tx for your help..
screen updating =false and calculation is manual . tthere is a for next... for each page begginning with A, save and close... all this operation takes many seconds... while the other pages are not calculated in real time as needed... so the problem is that the sub should be executed "in parallel" with the main sub.......... "Matthew Herbert" wrote: On Jul 15, 4:59 am, pls123 wrote: hello all..!! at 19.43 my main sub launch a close A sub that closes all the pages that begin with letter A. the problem is that these pages are many, and the closing process takes 20-30 seconds... and the subalterne sub must be ended before the main sub can prosecute... jumping many calculations cycles is there a way to indicate to excel that the subalterne sub must be executed in parallel ??? ty all pls123, In terms of "speed" you may want to consider setting ScreenUpdating to FALSE and Calculation to xlCalculationManual (reset if necessary at the end of the procedure). You can also set DisplayAlerts to FALSE to avoid from having the sheet deletion dialog box from prompting the user (reset after each sheet deletion). I'm not sure that I follow your order of events, i.e. delete a sheet, run the second procedure, go to the next sheet, delete the sheet, run the seond procedure, etc. Best, Matthew Herbert |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
subalterne sub in parallel
On Jul 16, 1:43*pm, pls123 wrote:
hi matthew !! tx for your help.. screen updating =false and calculation is manual . tthere is a for * *next... for each page begginning with A, save and close... all this operation takes many seconds... while the other pages are not calculated in real time as needed... so the problem is that thesubshould be executed "inparallel" with the mainsub.......... "Matthew Herbert" wrote: On Jul 15, 4:59 am, pls123 wrote: hello all..!! at 19.43 *my mainsublaunch a close A *subthat closes all the pages that begin with letter A. the problem is that these pages are many, and the closing process takes 20-30 seconds... and thesubalternesubmust be ended before the mainsubcan prosecute... jumping many *calculations cycles is there a way to indicate to excel that thesubalternesubmust be executed inparallel* ??? *ty all pls123, In terms of "speed" you may want to consider setting ScreenUpdating to FALSE and Calculation to xlCalculationManual (reset if necessary at the end of the procedure). *You can also set DisplayAlerts to FALSE to avoid from having the sheet deletion dialog box from prompting the user (reset after each sheet deletion). *I'm not sure that I follow your order of events, i.e. delete a sheet, run the second procedure, go to the next sheet, delete the sheet, run the seond procedure, etc. Best, Matthew Herbert- Hide quoted text - - Show quoted text - Pls123, As far as I know, there is no way of executing two or more procedures simultaneously. (I have never tried this, but I guess you could open two instances of Excel and try executing one macro in the first instance and the other macro in the second instance. Again, I have no idea whether this may work). Also, you can try changing your worksheet deletion For...Next to a For Each...Next. This should give you some more speed, but if you are doing a Save and Close after each page deletion then yes, the process will be somewhat slow. Best, Matt |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
subalterne sub in parallel
yes i will try putting the sub in a new page...that is opened.. at a desired
time.. and its runned on opening.. that may be the right idea.. tx !! "Matthew Herbert" wrote: On Jul 16, 1:43 pm, pls123 wrote: hi matthew !! tx for your help.. screen updating =false and calculation is manual . tthere is a for next... for each page begginning with A, save and close... all this operation takes many seconds... while the other pages are not calculated in real time as needed... so the problem is that thesubshould be executed "inparallel" with the mainsub.......... "Matthew Herbert" wrote: On Jul 15, 4:59 am, pls123 wrote: hello all..!! at 19.43 my mainsublaunch a close A subthat closes all the pages that begin with letter A. the problem is that these pages are many, and the closing process takes 20-30 seconds... and thesubalternesubmust be ended before the mainsubcan prosecute... jumping many calculations cycles is there a way to indicate to excel that thesubalternesubmust be executed inparallel ??? ty all pls123, In terms of "speed" you may want to consider setting ScreenUpdating to FALSE and Calculation to xlCalculationManual (reset if necessary at the end of the procedure). You can also set DisplayAlerts to FALSE to avoid from having the sheet deletion dialog box from prompting the user (reset after each sheet deletion). I'm not sure that I follow your order of events, i.e. delete a sheet, run the second procedure, go to the next sheet, delete the sheet, run the seond procedure, etc. Best, Matthew Herbert- Hide quoted text - - Show quoted text - Pls123, As far as I know, there is no way of executing two or more procedures simultaneously. (I have never tried this, but I guess you could open two instances of Excel and try executing one macro in the first instance and the other macro in the second instance. Again, I have no idea whether this may work). Also, you can try changing your worksheet deletion For...Next to a For Each...Next. This should give you some more speed, but if you are doing a Save and Close after each page deletion then yes, the process will be somewhat slow. Best, Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Parallel Box Plots | Excel Discussion (Misc queries) | |||
Parallel data series | Excel Discussion (Misc queries) | |||
Parallel ranges | Excel Programming | |||
Looping across two parallel ranges | Excel Programming | |||
Parallel Task (Threads) in VBa, is it possible? | Excel Programming |