Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default C++ ATL control on Excel 2003 VBA form

I have number of C++ ATL COM controls that I have on a VBA form. I noticed
that in excel (and maybe office in general) the default interface of the COM
component has been augmented with what looks like methods and properties from
MSForms.Control. At least that's how the intellisense makes it look.

1) Can someone explain exactly what's going on here? I assume excel (or VBA)
has dynamically shimmed up some new IDispatch implementation based on the
IDispatch of my COM object and forwards calls that belong to the 'real'
IDispatch onto the COM instance itself. But this is a guess...

2) I have a problem with *one* of these controls, that the others don't seem
to suffer. I can't QI (or Set I guess in VB parlance) to the default
interface of the underlying COM component. I always get type mismatch errors.
For example, I have some interface IFoo implemented by some coclass Foo. Foo
also supports all the other COM control interfaces - or enough to be a
'control' at least. I drop a Foo onto my excel VBA form and call it XFoo.

In some code on the Form I do

Dim LFoo As Foo
Set LFoo = XFoo

and the second line results in a type-mismatch.


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
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
How do I get 2003 Macros and Toolbar Buttons form Excel 2003 to 20 Scott Sornberger New Users to Excel 2 March 19th 08 11:42 AM
Tool Tip Text for Form control/ Active-X control Freddie[_2_] Excel Programming 0 October 19th 04 04:14 AM
PictureBox control in VBA Excel form? Thomas Wieser Excel Programming 1 April 9th 04 09:15 PM


All times are GMT +1. The time now is 01:53 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"