none
'Microsoft Visual Basic for Applications Extensibility 5.3' library bug in Office 2010 x64

    Question

  • Hi folks,

    I have come across what seems to be a bug in library 'Microsoft Visual Basic for Applications Extensibility 5.3' of Office 2010 x64 while upgrading a COM add-in for 64 bit:

    VBA refuses to register events for CommandBar controls of the VBE environment.

    I have uploaded a VBA repro file here:

    http://logismix.blob.core.windows.net/dynamicribbonx/VBE_Addin.xls

    VBA breaks at the following statement:

    Set MenuEvent.EvtHandler = Application.VBE.Events.CommandBarEvents(CmdBarItem)

    As far as I am aware, there is no alternative way to register to events of CommandBar controls of the VBA Editor and hence no way to create non-trivial add-ins for the VBE environment.

    In my company we have observed the same results from other automation clients (C++ add-in and C# add-in). The bug also appears to have been fixed in Office 2013 x64.

    In the (very likely) case that this is indeed a bug and given that the next version of Office is already out, should we expect a fix for this? We are working on a commercial product and we need to manage expectations of our clients.

    Many thanks,

    Yiannis

    Wednesday, July 31, 2013 4:39 PM

Answers

  • Hi YiannisSpyridakis.

    I have uploaded your excel and run without issue.

    Your macro will add two menu into Tools menu named “First Item” and “second Item”.

    When I click the new menus, message will be shown “Procedure_One” and “Procedure_Two”.

    There is Office 2010 X64 on my PC and I check the dll also is 'Microsoft Visual Basic for Applications Extensibility 5.3'.

    The only difference is my PC have not installed COM add-in.

    Could you please tell me the error information and your office version?

    It seems the problem is in add-in.

    I provide below link for you to refer:

    Running Solutions in Different Versions of Microsoft Office

    http://msdn.microsoft.com/en-us/library/vstudio/bb772080.aspx

    George Hua
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.



    Wednesday, August 7, 2013 4:14 PM
    Moderator

All replies

  • Hi YiannisSpyridakis.

    I have uploaded your excel and run without issue.

    Your macro will add two menu into Tools menu named “First Item” and “second Item”.

    When I click the new menus, message will be shown “Procedure_One” and “Procedure_Two”.

    There is Office 2010 X64 on my PC and I check the dll also is 'Microsoft Visual Basic for Applications Extensibility 5.3'.

    The only difference is my PC have not installed COM add-in.

    Could you please tell me the error information and your office version?

    It seems the problem is in add-in.

    I provide below link for you to refer:

    Running Solutions in Different Versions of Microsoft Office

    http://msdn.microsoft.com/en-us/library/vstudio/bb772080.aspx

    George Hua
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.



    Wednesday, August 7, 2013 4:14 PM
    Moderator
  • Hi George,

    When running Office 2010, 64-bit, I am also getting an error in Access and Excel at line,

    Set MnuEvt.EvtHandler = Application.VBE.Events.CommandBarEvents(CmdItem)

    Error: Object doesn't support this property or method (Error 438)

    No error on Office 2010 32-bit.

    Thanks,

    John

    Friday, August 9, 2013 5:42 PM
  • Thanks John,

    This is indeed the error I am getting.

    George,

    Thanks for the useful link. Let's ignore the COM add-in part because it has limited relevance: Office 2010 x64 errors while running the repro file itself. I am expecting info about the specific excel build from a colleague but the fact is that we have observed this behaviour in more than one excel builds, one of which was the latest version of Office Professional x64 downloaded from MSDN.

    Can you please double-check you are running the x64 version of Office (and not the x32 version on x64 Windows) as this is a very common mistake?

    (the relevant info is under File->Help->About Microsoft Excel)

    Thanks,

    Yiannis

    Friday, August 16, 2013 1:59 PM
  • Excel version:

    14.0.6023.100 (64-bit)

    Yiannis

    Monday, August 19, 2013 6:34 PM
  • I think Visual Basic is very dumb because it can list all the properties of an object for us but it can't find it itself when it needs it. Who are we kidding here? 


    • Edited by mr1data Friday, October 17, 2014 6:55 PM
    Friday, October 17, 2014 6:55 PM