ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   while my c# code running ,clicks on excel document interrupts code (https://www.excelbanter.com/excel-programming/426616-while-my-c-code-running-clicks-excel-document-interrupts-code.html)

Kayıhan

while my c# code running ,clicks on excel document interrupts code
 
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.


Nigel[_2_]

while my c# code running ,clicks on excel document interrupts code
 
Suggest you need to check you C# code. This is not the place to debug C

--

Regards,
Nigel




"Kayıhan" wrote in message
...
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.



Charles Williams

while my c# code running ,clicks on excel document interrupts code
 
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

"Kayihan" wrote in message
...
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.






All times are GMT +1. The time now is 09:22 PM.

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