ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB6 + Excel Objects 8 = 100% CPU on Win'NT (https://www.excelbanter.com/excel-programming/297402-vb6-excel-objects-8-%3D-100%25-cpu-winnt.html)

E.Fridman

VB6 + Excel Objects 8 = 100% CPU on Win'NT
 
Hi,

I noticed that my VB6 application that parses a database into Excel
spreadsheet causes 100% CPU utilization on my Win'NT 4 computer. Is it
normal? Should I be concerned?

TIA, Eugene



Chip Pearson

VB6 + Excel Objects 8 = 100% CPU on Win'NT
 
As long as the CPU utilization returns to a normal level when the
operation is completed, I wouldn't worry about it.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"E.Fridman" wrote in message
...
Hi,

I noticed that my VB6 application that parses a database into

Excel
spreadsheet causes 100% CPU utilization on my Win'NT 4

computer. Is it
normal? Should I be concerned?

TIA, Eugene





Steve Gerrard

VB6 + Excel Objects 8 = 100% CPU on Win'NT
 

"E.Fridman" wrote in message
...
Hi,

I noticed that my VB6 application that parses a database into Excel
spreadsheet causes 100% CPU utilization on my Win'NT 4 computer. Is

it
normal? Should I be concerned?

TIA, Eugene



It's normal. Any application that does a lot of calcs and memory
manipulation, such as yours, will use up as much CPU time as it can get.

If you watch the CPU time by Process, you will see that often the Idle
Process is using the most. Its time doesn't count in the CPU time
utilization, so if nothing is happening on your computer, the CPU time
reports 0%. But if any applications are busy doing things, the CPU time
will go up to 100%, while the idle process time will drop to 0%. If more
than one app is busy, the CPU time will be shared between them.

The only reason you can get intermediate values for CPU utilization is
that it is a time interval average (normal interval is two seconds), and
sometimes apps will start and finish their business in less than the
time interval.

If you are concerned by how long your process takes to complete, you
might look at your code. Updating cell by cell is relatively slow, since
each call involves marshalling data between two processes (your app and
Excel). If you can arrange the values as comma-delimited text with line
breaks, you can copy the whole range as text to the clipboard in VB,
then select a spot in the excel worksheet and paste. It's much faster.




All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com