Phiên Hỏi & Đáp hôm nay đến với chúng tôi theo lịch sự của SuperUser - một phân khu của Stack Exchange, một nhóm các trang web Hỏi & Đáp do cộng đồng điều hành.
Alien chiến binh clip nghệ thuật lịch sự của Clker.com.
Câu hỏi
Người đọc SuperUser learningAsIGo muốn biết liệu có cách nào giới hạn mức sử dụng CPU của Microsoft Excel trong khi chạy tập lệnh VBA trên máy tính của mình hay không:
Is there a way to limit Microsoft Excel’s CPU usage when it is running? I have a VBA script that calculates a large amount of giant array formulas. The entire set of calculations takes approximately twenty minutes to complete and uses 100 percent of my CPU. I am unable to use my computer during this time and would rather have Excel ‘running in the background’ while using about 50 percent of my CPU’s capacity so that I can continue to do other things.
Any suggestions? My computer’s operating system is Windows 7 Enterprise 64-bit with a 2007 32-bit version of Excel installed on it.
Có cách nào để hạn chế sử dụng CPU của Microsoft Excel trong khi chạy các chức năng VBA không?
Câu trả lời
Người đóng góp của SuperUser mtone có câu trả lời cho chúng tôi:
If a VBA function is called from several formulas or if your script generates or forces the recalculation of several formulas, then this should definitely make use of the multi-threaded calculation feature in Microsoft Excel. Respectively, this would either run multiple instances of your VBA function for each formula, or recalculate multiple cells simultaneously while your VBA script is running on a single thread.
You can limit the number of threads used by Excel to recalculate formulas by going to Options and selecting the Advanced Section, then scrolling down until you reach the Formulas sub-section.
Có cái gì để thêm vào lời giải thích? Tắt âm thanh trong các ý kiến. Bạn muốn đọc thêm câu trả lời từ những người dùng Stack Exchange có hiểu biết công nghệ khác? Xem toàn bộ chuỗi thảo luận tại đây.