I have several command buttons a worksheet that activate their on-click event (_Click) when clicked. These have worked for several years and then all of a sudden they no longer work. And more so, the VBA errors with “Variable not defined” when the workbook is opened event though when I go into design mode I see the controls name and when I double click it it displays the _Click() VBA code for the sheet.
I’ve brought back archived versions and they now also react this way. I was thinking this might have been some setting changed in my Excel options but this behavior occurs on both my home and work versions of Excel (2010 at home and 2007 at work).
What is happening?
After the recent (10 Dec 2014) automatic Microsoft Office update,
the cached control type libraries (extender files, *.exd) may be out of sync. To resolve this issue, you must delete the cached versions of the control type libraries (extender files) on the client computer.
All *.exd files must be deleted; they will be re-generated automatically the next time Office needs them.
To do this, first, close all Office applications, and then either:
Put this in a batch file (a text file with extension .bat) and execute it.
del %temp%\vbe\*.exd del %temp%\excel8.0\*.exd del %appdata%\microsoft\forms\*.exd del %appdata%\microsoft\local\*.exd del %temp%\word8.0\*.exd del %temp%\PPT11.0\*.exd
Or, alternatively, search your hard drive for files named
*.exd and delete them all — though if you happen to have unrelated files with an .exd filename extension, be careful not to accidentally delete those!