Recent Security Updates To Company Computers Have Affected VBA in Excel 2010 (32 bit)

On 19 February, 2015, IT pushed Security Updates (see below for list).  The following day several macros failed to execute.  A closer look at the code revealed that the problem occurred when toggling between excel workbooks.  Specifically, the "Windows.Activate" did not happen causing the next line of code to give a subscript out of range error.  The worksheet couldn't be found in the still active incorrect workbook.  The macros affected were written years ago and have worked without incident for years.

To test this, I created 3 files and recorded various toggling actions.  These recorded lines of code also failed, showing me that there is nothing wrong with the code itself, but in the way the machine was able to execute it. 

I also tried the failing macros on other machines to determine whether this was my machine or if other were affected.  Again the result was the failure.

Please help!  We rely on these workbooks to make important business decisions daily!

Here is the test code I created to illustrate the failure.  In this code, the failure occurs when Test 3 should be activated. 

Sub Macro1()
'
' Macro1 Macro
'

'
    Windows("Test 2.xlsx").Activate
    Sheets("Sheet2").Select
    Range("A1:C3").Select
    Selection.Copy
    Windows("Test 1.xlsm").Activate
    Sheets("Sheet2").Select
    ActiveSheet.Paste
    Windows("Test 2.xlsx").Activate
    ActiveWorkbook.Save
    ActiveWindow.Close
    Windows("Test 3.xlsx").Activate
    Sheets("Sheet1").Select
    Range("A1:C3").Select
    Selection.Copy
    Windows("Test 1.xlsm").Activate
    Sheets("Sheet3").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("Sheet1").Select
    Windows("Test 3.xlsx").Activate
    ActiveWorkbook.Save
    ActiveWindow.Close
    Sheets("Sheet1").Select
    ActiveCell.FormulaR1C1 = "The End"
    Range("A2").Select
End Sub
Here are the updates that were installed.

KB2810073, KB2687423, KB2880971, KB2850016, KB2956066, KB2920748, KB2956081, KB2687455, KB2826023, KB2837597, KB2956073

Thanks!

Keith

March 4th, 2015 1:15pm

Hi,

We have not seen the similar issue in this forum yet. I checked your update list, I found some updates were not released in 19 February, 2015 (Such as KB2880971.)

As far as I know, the some macros/activate X controls can't be used after installing MS14-082 Microsoft Office Security Updates for December 2014. Please try the workaround:

Delete the cached versions of the control type libraries (extender files) on the client computer. To do this, perform a search on your hard disk for files that have the ".exd" file name extension and delete all the .exd files that you find. These .exd files will be re-created automatically when you use the new controls the next time that you use VBA. These extender files will be under the user's profile and may also be in other locations, such as the following: 
  • %appdata%\microsoft\forms
  • %temp%\excel8.0
  • %temp%\word8.0
  • %temp%\PPT11.0
  • %temp%\vbe

Then, if this issue still exists, please try to remove all the updates to test. It'll help us to narrow down the issue.

Next, if this issue still occurs when we have removed the updates, we may need to debug the code.I recommend you post the question to MSDN forum:

http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc

Regards,

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
March 5th, 2015 12:41am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics