View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Aale de Winkel Aale de Winkel is offline
external usenet poster
 
Posts: 12
Default SheetBeforeDoubleClick and merged cells

.....
app.SheetBeforeDoubleClick += new
Microsoft.Office.Interop.Excel.AppEvents_SheetBefo reDoubleClickEventHandler(app_SheetBeforeDoubleCli ck);
.....
void app_SheetBeforeDoubleClick(object Sh,
Microsoft.Office.Interop.Excel.Range Target, ref bool Cancel)
{
MessageBox.Show("Hello")
}

Changed to the above to test your assumption!
and indeed you seem to be right since both single cell and merged cell yield
"hello"
so there must be something inside my eventhandler that disables it to
function!

Thanks, I'll need to study further. It is just that I see nothing in my code
that makes
use of the fact that cells aren't merged. So the deactivation is unexpected.
Will take some time to figure out what exactly deactivates the event

Thanks

"NickHK" wrote:

It could be that you code is not dealing with merged cells correctly and is
producing errors.

NickHK

"Aale de Winkel" wrote in message
...
Dear Reader

I succesfully implemented SheetBeforeDoubleClick (Excell application

level)
using VSTO end VS 2005 (professional)
It works as long as cells ain't merged together.
when I double-click on single cells everything works as expected, however

any
merged cell seems to destroy the event hookup, since after this even

clicking
a single cell does not work anymore.
Thus presents I reckon a serious drawback in the layout-possibility of a
spreadsheet
with C#-implemented add-inns.

I'm currently at a loss to this issue, any idea's I welcome!