473,410 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

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

Nov 17 '05 #1
3 2976
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

Nov 17 '05 #2

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

Nov 17 '05 #3
very thanks Troy and keepITcool,

But this is limited to office 2003 only. and i need it for office 2000
and XP also.
But great support, if you ppls have any idea for office 2000 and XP pls
reply me.

thanks,
rushikesh

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: | last post by:
Hi, I am trying to allow my Intranet users to upload their Microsoft Office Documents and then have them viewed as .html files. So far, through COM i am able to get WORD documents to convert...
6
by: Colin Young | last post by:
I've got a owner-drawn listview control that displays images and now I'm trying to implement drag and drop so I can drag images from the control and drop them onto other applications. So far if I...
4
by: Lisa | last post by:
Hi - I'm able to open excel workbooks and word documents, but I can't seem to copy excel charts, named ranges, etc. to a word document. Anyone know of good reference material in this area? What...
2
by: Dave A | last post by:
I am stuggling with databinding a drop down list, hooking into the SelectedIndexChanged and attempting to avoid using the viewstate. The drop down list is quite large so I would prefer to avoid...
2
by: polabear | last post by:
I'm converting a VB6/SQL Server application to a web application. I need to read data to and from Excel and Word. I'm not allowed to install Excel and Word on the server, only on the client. Is...
0
by: jediknight | last post by:
Hi I have some javascript which allows me to have some sort of autocomplete functionality for drop downs but I cannot get the selectedIndex event to fire when the user selects the item from the...
2
by: ConieFL | last post by:
I have and excel spreadsheet with a custom toolbar. On the end of the custom tool bar is a down arrow for a pull down menu which displays 'Add or Remove Buttons' Is there a way not to display...
1
by: DennisBetten | last post by:
First of all, I need to give some credit to Mahesh Chand for providing me with an excellent basis to export data to excel. What does this code do: As the title says, this code is capable of...
1
navanova
by: navanova | last post by:
Greetings, I have a problem of opening ms word and excel files on my computer. The files are there for a long time. I use to open and modify them. Suddenly, when i try to open the word files, a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.