Slow loading after open many excel with batch

alee001

Board Regular
Joined
Sep 9, 2014
Messages
154
Office Version
  1. 2010
Platform
  1. Windows
Hello,
I am a novice for batch script, I don't know why slow loading (show on state bar calculating) after open many excel files with my bat file (Open system.bat) as following. But normal fast if independent open them. anyone help me? Thanks.
Code:
@echo off
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_02.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_03.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_04.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_05.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_06.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_07.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_08.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_09.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_10.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_11.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_12.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_13.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_14.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_15.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_16.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_17.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_18.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_19.xlsb"
start "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "C:\Users\alee\Documents\My Documents\My system\System ver3_20.xlsb"
exit
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I suspect that your problem is because you are starting multiple versions of EXCEL instead of opening multiple files in a singe instance of excel. Have a look on task manager and see how much memory is being taken up by excel., check it after running only one or two lines of your script. I think you should open one instance of excel which opens an excel file with a macro which runs on open, to open all of the files you need and then closes itself down.
 
Upvote 0
I suspect that your problem is because you are starting multiple versions of EXCEL instead of opening multiple files in a singe instance of excel. Have a look on task manager and see how much memory is being taken up by excel., check it after running only one or two lines of your script. I think you should open one instance of excel which opens an excel file with a macro which runs on open, to open all of the files you need and then closes itself down.
Thanks for your reply, I must open them with each independent Excel in order to run VBA. I had tried to run several open file, but I don't know why the CPU is still loading increase? But no problem open with Alt+Excel.

PS Windows 11 Pro, Excel 2021, i9-11900K
 
Upvote 0
The problem is that if you manually open each Excel file, it will only automatically calculate the current window, but if you use batch to open the Excel file continuously, it will continue to simultaneously calculate the opened files, which will cause the CPU to be overloaded. Finally, the error will flash. Retreat, how can I solve it?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top