ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   notify drop event of excel/word in C# add-in (https://www.excelbanter.com/excel-programming/332300-notify-drop-event-excel-word-c-add.html)

Rushi

notify drop event of excel/word in C# add-in
 
Hi Friends,

I don't know how many times I have submitted this topic, but no one is
trying to answer me....please some one try to help me.

I have created an add in C#, which is popup a form on excel. Now my
query is, i have a tree control which contain some data. now when user
drag any item to excel cell at that time i want information about that
cell...like cell location, WorkSheet name, cell value...etc

At first it's seems easy...but it's not. I have tried by using invoke
methods of excel...but no luck no any idea which method i have to
invoke. Is there any way from where i can findout/raise those drop or
dropleave method of excel Worksheet.

This is my fifth post past 6 days....please some one try to help me.


Your help is greatly appreciated.
Thanks,
Rushikesh Joshi


[email protected]

notify drop event of excel/word in C# add-in
 
You need to handle the SheetChange event of either the Worksheet or
Application object. Excel will pass you the Range object in the event.

For more information, and examples in C#:

http://msdn.microsoft.com/library/de...VSTSQLExcl.asp

Troy


keepITcool

notify drop event of excel/word in C# add-in
 



an ultra simple VBAevent handler to catch drops:

''code for thisworkbook:
Option Explicit

Dim WithEvents xlapp As Excel.Application

Public Sub workbook_open()
Set xlapp = Application
End Sub

Private Sub xlapp_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If xlapp.CellDragAndDrop Then
MsgBox "Drop on " & Target.Address(external:=True)
End If
End Sub




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Rushi wrote :

Hi Friends,

I don't know how many times I have submitted this topic, but no one is
trying to answer me....please some one try to help me.

I have created an add in C#, which is popup a form on excel. Now my
query is, i have a tree control which contain some data. now when user
drag any item to excel cell at that time i want information about that
cell...like cell location, WorkSheet name, cell value...etc

At first it's seems easy...but it's not. I have tried by using invoke
methods of excel...but no luck no any idea which method i have to
invoke. Is there any way from where i can findout/raise those drop or
dropleave method of excel Worksheet.

This is my fifth post past 6 days....please some one try to help me.


Your help is greatly appreciated.
Thanks,
Rushikesh Joshi



All times are GMT +1. The time now is 05:32 PM.

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