Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.vb.addins
external usenet poster
 
Posts: 1
Default Addin for Excel - general doubts

I have a basic c++ com based addin running inside excel already. But what i
dont know is how much of a latitude is the addin allowed while inside excel.

IDTExtensibility2 defined a class(com) that can be created by excel.
Whenever something interesting happens, excel calls one of its methods to
tell the class something has happened. USUALLY it is here that class could
do whatever it wants. Or rather the excel object structure implies so. But
if you notice, from the addins side, it is just a class that is present in
this equation. A class cant execute instructions by itslef. So it is some
EXCEL thread that has loaded the addin class and calling the class's method
on its behalf.

Now, if i were to start a timer from my classes loading routine, that would
basically mean that i have a timer for that particular thread concerned.
That would mean that i am messing around with one of excels threads. I dont
want to do that.

i dont know if it is ok to interrupt excel thread like this or in any other
manner. can i ask Excel "please wake me up periodically so that i can do my
work & not interrupt or break you in any way either" ?

If there is no way to do the above mentioned thing, well the next option is
probably to have a thread of my own. Then the problem becomes "how can i
interrupt excel from this new thread" Well, i have an Application handle
that my IDTExtensibility2 class was given when it was loaded by excel. I
could use that to probe excel / temporarily ask excel to wait while i do
something else / or simply raise an event that can be handled by the
instance of my original addin class. (I think the last one is more clean and
probable)

I dont know if it is ok or thread safe to call into excel randomly (& rudely
like this) using the app pointer. And even if it was thread safe i wouldnt
know how to raise an event myself, intended for my com addin Or well, it is
safe to do so, i could simply modify the cells contents myself from that
thread - but i really dont think so.

i have external events and i need to respond to them and make changes to
excel. I cant use RTD or DDE because i wouldnt know in advance which cells
to change. Or is there any other technology thats there suitable for this
kind of situation ?

Please suggest.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
xy chart doubts sivaprakasam New Users to Excel 1 July 24th 09 01:49 PM
excel doubts mehvish91 Excel Discussion (Misc queries) 12 October 17th 08 11:06 AM
Microsoft Excel doubts [email protected] Excel Discussion (Misc queries) 2 March 18th 08 01:58 PM
Two doubts for Macros xavi garriga Excel Discussion (Misc queries) 2 September 4th 07 01:45 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM


All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"