LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default What's special about iRibbonControl?

I have an add-in which I'm trying to make compatible with XL2007 while still
supporting earlier versions of Excel. I've replaced my commandbars and
menus with new ribbon stuff. Each of my ribbon button's has an onAction
attribute that specifies the name of a VBA Sub in my add-in.

I'd like to code the subroutine as:

Sub ButtonClick(Control As Object)
or
Sub ButtonClick(Control As Variant)

to maintain compatibility with earlier versions of Excel which I can't do if
I code it as:

Sub ButtonClick(Control As iRibbonControl)

since iRibbonControl isn't defined in the earlier Excel libraries.

Unfortunately my approach doesn't work! When I click the button I get the
message:

run-time error 424
Object required

when my code tries to access one of the public properties of Control. If I
put Control into a Watch window, the type looks OK ("Object/iRibbonControl")
and if I expand it I see the public properties (Context, Id & Tag) but each
property has a value of "<Object required".

Anybody got any explanation?

TIA,

josh

BTW, if I do code the Control argument as iRibbonControl then the rest of my
code works OK.


 
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
How to use now() in a special way The Fool on the Hill Excel Discussion (Misc queries) 13 July 13th 07 02:16 PM
Special Welcome Pop Up FARAZ QURESHI Excel Discussion (Misc queries) 3 January 1st 07 10:28 PM
Special Characters aftamath Excel Discussion (Misc queries) 1 October 18th 05 11:02 PM
Very special Alvin Hansen[_2_] Excel Programming 5 December 1st 04 05:15 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM


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

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

About Us

"It's about Microsoft Excel"