none
CommandButton21 is not executed on some Machines with XL2010 RRS feed

  • Question

  • Hi

    In our company, there are several computers that have installed the exact same software and install the same updates. The control panel shows a lot of installed updates, last is from 22.12.2014

    When I create an ActiveX button on my PC, the button is named "CommandButton21", the event routine is this:

    Private Sub CommandButton21_Click()
      MsgBox "CommandButton21"
    End Sub

    and it works.

    But when I open the file on another computer, then the button is not working. I can see that Excel "renames" the same button as CommandButton1 when it opens the file:

    The same issue exists with older files, e.g. my PC shows the button name as "cb_Laden", but the other shows "CommandButton3" or something else.

    I have checked the security updates mentioned here:

    https://support.microsoft.com/en-us/kb/3025036/en-us

    I tried the Fix-it, delete the *.exd manually and de-install the update KB2553154 but nothing helps.

    I don't have any clue what is the difference, suggestions please. :-)

    EDIT: I've seen that our server has shared a lot of updates for one machine today, so which one of this updates can cause the issue?

    Andreas.

    Thursday, May 21, 2015 9:56 AM

Answers

All replies

  • I found a solution:

    a) Install this update:

    MS14-082: Description of the security update for Microsoft Office 2010: December 9, 2014
    https://support.microsoft.com/en-us/kb/2553154

    b) Install this update:

    March 10, 2015, update for Office 2010 (KB2920813)
    https://support.microsoft.com/en-us/kb/2920813

    c) Delete all *.exd files that can be found on the PC

    Andreas.

    Thursday, May 21, 2015 11:07 AM
  • What version of windows are you using? If Win 2007 then first ensure you have all office updates installed.

    Next close any open programs (In particular all Office programs including Outllook) and then select the Windows button and then type %temp% in the "Search programs and files" field and press Enter to display all of the temporary files. Select all of the temporary files and folders (Ctrl and A) and delete.

    For any messages indicating that can't delete a file because in use then just select skip.

    If you have multiple user Id's on the computer then repeat above for each user.

    Restart Excel and see if you still have the problem. (It should be fixed.)

    Deleting the temp files does not cause problems but can make booting faster and might even enhance the normal performance of the computer. Deleting the temp files forces Office to recreate them instead of using the previously created obsolete temp files that are causing the problem.


    Regards, OssieMac

    Thursday, May 21, 2015 11:14 AM
  • What version of windows are you using? If Win 2007 then first ensure you have all office updates installed.

    Hi OssieMac, thank for the answer.

    In our company each update requires a release of our administrator. And we do not install all updates.I do not know what criteria he uses, I trust him, he is an expert in these things.

    As you see above, in the interim I found a solution for my department.

    But even if you have installed all the updates, you can get into trouble. At home I have Win8.1 and XL2010, works fine.

    A few days ago I've looked into a file (from an other user in this forum), I could not see any command button on the sheet, but I can see a Private Sub CommandButton1_Click() in the code module.

    If I try to execute that sub manually (be pressing F8 in the VBA editor) I get some error messages, among others a RTE 32809.

    I've changed the code and send only the sub back to the user and he said anything works fine...

    EDIT: I've checked the file with Win8.1 and XL2013 on a virtual machine (with all updates installed), no issues, except that the command button is missing.

    Any idea about that?

    Andreas.


    Thursday, May 21, 2015 2:55 PM
  • Hi Andreas,

    Is this similar to the issue you raised here and apparently resolved or is this different?

    Are you sure all *.exd files were renamed or removed after the updates? No harm to delete them again.

    A long shot more a wild hunch, after inserting the objects try renaming them with a non-default type name, eg "cmdButton1"

    Thursday, May 21, 2015 7:31 PM
    Moderator
  • In our company each update requires a release of our administrator. And we do not install all updates.I do not know what criteria he uses, I trust him, he is an expert in these things.

    One of the charities that I support was still having problems with the ActiveX controls after the problems were supposed to be resolved with further updates. Their system administrator had a policy of only installing some updates but after convincing him to allow all of the updates the problems all went away.

    After the initial fix for the problem introduced late last year (that could be resolved by deleting all of the temp files which included the *.exd files) the default ActiveX control names started at 21 instead of 1. A later update resolved this and now they start a 1 again. The description of your problem leads me to believe that an update (or updates) is missing.


    Regards, OssieMac

    Thursday, May 21, 2015 11:35 PM
  • Is this similar to the issue you raised here and apparently resolved or is this different?

    Hi Peter, this is different.

    I've updated all my machines with the related updates, I've asked a question about the CommandButton21 symptom here in 2/2015:

    https://social.msdn.microsoft.com/Forums/de-DE/f9f0ee8d-155c-408c-a538-c63c51bb7b3b/commandbutton21-is-created-instead-of-commandbutton1?forum=excel

    Today my home machine creates the button as "CommandButton1" again, so I guess I have all and anything is fine. (And all my personal files works well, no issues).

    So I was very surprised to get a file from someone else that shows a RTE 32809 with a "CommandButton1". Here is a link to that file:

    https://dl.dropboxusercontent.com/u/35239054/RTE%2032809.xlsm

    BTW, I have a RAM disk for all my temporary files, means the *.exd files are deleted daily.

    Andreas.

    Friday, May 22, 2015 5:24 AM
  • So I was very surprised to get a file from someone else that shows a RTE 32809 with a "CommandButton1". Here is a link to that file:

    Hi again Andreas,

    The file in the drop box appears to be corrupted. I suggest due to the problems with the initial problem Update from end of last year and the file was created before all of the fix updates were installed. I am not able to get an ActiveX command button to work in it.

    I can create a command button and then View code and it creates the Sub and End sub but I place a msgbox in the sub and click the command button and nothing happens. Even tried renaming the button as suggested by Peter Thornton but no luck.


    Regards, OssieMac

    Friday, May 22, 2015 6:49 AM
  • I got your file, I don't get a "RTE 32809" (don't even know what that is) however there are no Commandbuttons on the sheet. I would not expect there to be one even if the file was reopened in the original system because there is no definition for the button in the xml file, unzip and look in xl\worksheets\sheet.xml.

    However, unlike OssieMac, I didn't notice any obvious sign of corruption and no problem to add a new button and call its built-in events.

    I've never looked much at trust center settings / ActiveX settings, and not sure if these apply to built-in controls or only third party controls, might be worth taking a look.

    However, like OssieMac, I suspect it's more likely related to the updates, assuming the button was actually saved with this file. 

    Friday, May 22, 2015 9:00 AM
    Moderator
  • The file in the drop box appears to be corrupted.

    Hi OssieMac,

    That was my first thought too. But when I open the same file with XL2013, I can run the code, I can create a command button (which is named "CommandButton1") and when I click it, the code runs without any issues.

    So IMO the issue is not in the file.

    Andreas.

    Friday, May 22, 2015 9:05 AM
  • Hi again Andreas,

    With further testing I find if I save the file after creating a command button and then close and re-open Excel then it works fine. Just closing the file and re-opening without closing Excel does not work; must close and re-open Excel also.

    So there is some glitch in the file that is affecting Excel and Excel rights itself after closing and re-opening Excel.


    Regards, OssieMac

    Saturday, May 23, 2015 3:22 AM