while my c# code running ,clicks on excel document interrupts code

K

Kayıhan

lets take from beginning...
create a c# project; create a form and button.

when button clicked; program
changes the interior color of cells in an excel document which is blank and
opened in formload event.
after program started, if you dont touch anything, program fills all cells
properly. But while processing, if you clicked on some cells randomly,
program skips some of cells and go on processing. why does it do that?
i mean ;my clicks somehow interrupts program but it doesnt return any error.
 
C

Charles Williams

Try preventing user interrupts like Mouse-clicks by switching EnableEvents
to false.

You may also need to set Application.CalculationInterruptKey and think about
Application.EnableCancelKey

Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com
 
Top