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

  • Thread starter Thread starter Kayıhan
  • Start date Start date
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top