0

We have 25 users using an excel VBA application with 4 buttons which are activeX controls.

For only 2 users, only under their own profiles and only on their own machines, Excel fails to recognize the buttons, goes into design mode, and renames the command buttons, and does so every time it launches.

So, this is what it looks like.

ORIGINAL configuration: cmd_A, cmd_B, cmd_C, cmd_D:

with events cmd_A_click, cmd_B_click, cmd_C_click, cmd_D_click:

Then, when these two users launch the file, Excel renames the buttons.

CommandButton1,CommandButton2, CommandButton3,CommandButton4

then the next time it launches:

CommandButton5, CommandButton6, CommandButton7, CommandButton8

and so on, every time four more progressive iterations.

NOTE: No new buttons are being created, Excel is just renaming the buttons and then, when troubleshooting and trying to force code execution, we get the error of "cannot execute in design mode"

Now, for the interesting part:

It ONLY happens with these two users, on their two machines with their profiles:

  • Their profiles will not corrupt the file when executed on another machine
  • Other profiles on their machines will not corrupt the file

The machines have been wiped and reimaged, user rights have been elevated to admin, desktop support, networking and application support.

None of us can identify any cause, only the effect.

Our entire team is out of ideas, so I'm posting this looking for anything else to try.

So, the question:

What else can we try?

  • That's extremely odd and I am digging. It looks like we had an [unanswered question](http://stackoverflow.com/questions/28230436/excel-commandbutton-names-changing) with this issue before. – Jimmy Smith Oct 25 '16 at 16:34
  • 1
    Have you tried deleting their profiles ? – Tim Williams Oct 25 '16 at 16:34
  • Is there anything different with their versions of Excel? – Jimmy Smith Oct 25 '16 at 16:35
  • 2
    Check http://stackoverflow.com/questions/28048549/activex-button-renaming and http://excelmatters.com/2014/12/10/office-update-breaks-activex-controls/ – Tim Williams Oct 25 '16 at 16:36
  • @TimWilliams their profiles have been deleted and recreated and machines reimaged and all updates have been loaded. –  Oct 25 '16 at 17:21
  • @JimmySmith nothing different at all. The problem only happens when these users are accessing their profiles one their machines –  Oct 25 '16 at 17:44

2 Answers2

0

I followed a trail that lead me to this kb but your issue sounds profile specific.

Have you ever done a profile reset?

You rename their user folder (sometimes c:\users\profilename) to profilename.old. This will recreate their profile and then you can copy their desktop items/favorites/settings back over.

Jimmy Smith
  • 2,452
  • 1
  • 16
  • 19
  • 1
    Profile reset, re-imaged the computers, and tried everything shy of voodoo. Funny thing is that the profiles work on other computers, and other profiles work on their computers. It's only when their profiles are on their computers when we see this problem. –  Oct 25 '16 at 18:13
  • When you say reimaged, see the KB above, is it possible they are working off a bad office update? But if that were the case, then that doesn't explain why other profiles work fine after the reinstall or why it works on their profiles elsewhere... This might be a time to call a witch doctor – Jimmy Smith Oct 25 '16 at 18:16
  • 1
    Yes, I looked at the KB above. I'm thinking of replacing the activex controls with either a user form or just form controls. Failing that, I'll try enlisting the help of zeddicus zu'l zorander –  Oct 25 '16 at 18:22
0

I have replaced the ActiveX controls with form controls and that seems to have solved the problem.

Since the only thing in the click events were single function calls, the form controls were an effective work around. While this is not technically a fix, it is something we can live with.

I'm posting this answer so anyone else searching can see this as a workaround if they can't fix the issue.