473,657 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2985
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.Applicati on

Public Sub workbook_open()
Set xlapp = Application
End Sub

Private Sub xlapp_SheetChan ge(ByVal Sh As Object, ByVal Target As Range)
If xlapp.CellDragA ndDrop 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
2419
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 via this method function method_convert_word (){
6
2642
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 drop on windows explorer it works (i.e. an image file is created where I dropped the image) or the console displays the full path to the image. Unfortunately it doesn't work with Excel. Nothing at all happens. No error, nothing. The code I am...
4
3244
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 little documentation I've been able to find focuses on using only one office app at a time. Thanks for your help
2
3022
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 using the view state so I set EnableViewState on the page to false. To enable the drop down list to bind to a datasource I bind it during the OnInit. I do a response.Write during the SelectedIndexChanged event to verify that the event fires. ...
2
2599
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 there a way to use client side scripts to read from and write to Excel/Word files? Any suggestions are appreciated Thanks, polarbear
0
1171
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 drop down. Typically I want the user to be able to select from a drop down by typing and then autocompleting depending on what he types. Then I need the selectedIndex changed event to fire so that I can do some run serverside code.
2
1794
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 the 'Add or Remove Buttons' drop down on a user created custom toolbar?
1
6682
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 extracting all tables and it's data from any given database! I was searching the net for a program like this, but I didn't come accross any (free) versions. So I decided to write it myself. To get this code to work, you need to add a reference to...
1
2429
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 dialog box appears that says "There was an error opening the file". when i try to open the excel files, a dialog box appears that says "File format not valid". I have tried to create a new word and excel files, save them and when i try to open these...
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5642
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.