Programming

Microsoft Excel ActiveX 컨트롤이 비활성화 되었습니까?

procodes 2020. 7. 28. 22:09
반응형

Microsoft Excel ActiveX 컨트롤이 비활성화 되었습니까?


ActiveX 확인란을 사용하여 특정 활동을 제어하는 ​​Excel 워크 시트가 있습니다. 그들은 최근에 일했지만 오늘 오류가 발생하기 시작했습니다. 동료가 이에 대해 경고했지만 여전히 내 컴퓨터에서 작동하고있었습니다. 나는 그의 Excel 버전을 내 것과 비교하여 확인했으며 그의 최신 버전이었습니다. 새로운 Windows 업데이트가 있음을 확인하여 업데이트를 수행했습니다. 보류중인 업데이트를 적용한 후에는 더 이상 내 컴퓨터에서 작동하지 않습니다. ActiveX 확인란을 더 이상 확인할 수 없으며 디버그 시도의 일부로 ActiveX 컨트롤을 모든 워크 시트, 심지어 새로운 워크 시트에도 추가 할 수없는 것처럼 보입니다. "개체를 삽입 할 수 없습니다"라는 오류 대화 상자가 나타납니다. (ActiveX가 아닌 양식 컨트롤을 계속 추가 할 수 있습니다.) 최근에 업데이트 한 후에 다른 사람이 있습니까? 어떤 제안?

감사,

마이크


다른 포럼에서는 MS 업데이트로 인한 것이며 사용자 프로필의 Temp 하위 폴더에서 MSForms.exd 파일을 삭제하는 것이 좋습니다. 예를 들어 :

C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd

C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd

C:\Users\[user.name]\AppData\Local\Temp\Word8.0\MSForms.exd

물론이 파일을 삭제하려면 응용 프로그램 (Excel, Word ...)을 닫아야합니다.


다음은 Microsoft Excel 지원 팀 블로그에서 찾은 최고의 답변입니다.

일부 사용자의 경우 2014 년 12 월 업데이트를 설치 한 후 Forms Controls (FM20.dll)가 더 이상 예상대로 작동하지 않습니다. 양식 컨트롤을 사용하여 기존 VBA 프로젝트에서 파일을 열거 나 새 워크 시트에 양식 컨트롤을 삽입하거나 이러한 구성 요소를 사용할 수있는 타사 소프트웨어를 실행할 때와 같은 문제가 발생합니다.

다음과 같은 오류가 나타날 수 있습니다.

"개체를 삽입 할 수 없습니다" "개체 라이브러리가 유효하지 않거나 찾을 수없는 개체 정의에 대한 참조가 포함되어 있습니다"

또한 ActiveX 컨트롤을 코드를 통해 워크 시트의 멤버로 참조하려고하면 워크 시트에서 ActiveX 컨트롤의 속성을 사용하거나 변경하지 못하거나 오류가 발생할 수 있습니다. 업데이트 후 따라야 할 단계 :

이 문제를 해결하려면 클라이언트 컴퓨터에서 캐시 된 버전의 컨트롤 형식 라이브러리 (확장자 파일)를 삭제해야합니다. 이렇게하려면 파일 이름 확장명이 ".exd"인 파일을 하드 디스크에서 검색하고 찾은 모든 .exd 파일을 삭제해야합니다. 다음에 VBA를 사용할 때 새 컨트롤을 사용하면 이러한 .exd 파일이 자동으로 다시 만들어집니다. 이러한 익스텐더 파일은 사용자의 프로필에 있으며 다음과 같은 다른 위치에있을 수도 있습니다.

% appdata % \ Microsoft \ forms

% temp % \ Excel8.0

% temp % \ VBE

스크립팅 솔루션 :

이 문제는 둘 이상의 컴퓨터에 영향을 줄 수 있으므로 EXD 파일을 삭제하고 정책을 사용하여 로그온 프로세스의 일부로 스크립트를 실행하는 스크립팅 솔루션을 만들 수도 있습니다. 필요한 스크립트는 다음 줄을 포함해야하며 .exd 파일은 사용자마다 다르므로 각 USER마다 실행해야합니다.

델 % temp % \ vbe \ *. exd

델 % temp % \ excel8.0 \ *. exd

del % appdata % \ microsoft \ forms \ *. exd

del % appdata % \ microsoft \ local \ *. exd

del % appdata % \ Roaming \ microsoft \ forms \ *. exd

델 % temp % \ word8.0 \ *. exd

델 % temp % \ PPT11.0 \ *. exd

추가 단계 :

위의 단계로 문제가 해결되지 않으면 테스트 할 수있는 다른 단계가 있습니다 (아래 경고 참조).

  1. 완전히 업데이트 된 컴퓨터에서 .exd 파일을 제거한 후 편집 권한으로 Excel에서 파일을 엽니 다.

    Visual Basic for Applications를 열고 코드 모듈> 디버그> VBA 프로젝트 컴파일에 주석을 추가하거나 프로젝트를 수정하십시오.

    파일을 저장하고 다시여십시오. 해결을 테스트하십시오. 해결 된 경우이 업데이트 된 프로젝트를 추가 사용자에게 제공하십시오.

    경고 :이 단계로 문제가 해결되면이 업데이트 된 프로젝트를 다른 사용자에게 배포 한 후 해당 사용자는 시스템 및 .exd 파일에도 적용된 업데이트를 제거해야합니다.

이렇게해도 문제가 해결되지 않으면 다른 문제 일 수 있으며 추가 문제 해결이 필요할 수 있습니다.

Microsoft는 현재이 문제를 해결하고 있습니다. 블로그에서 업데이트를 확인하십시오.

출처


그것은이었다 KB2553154 . Microsoft는 수정 프로그램을 출시해야합니다. Excel 응용 프로그램 개발자는 모든 클라이언트 컴퓨터로 이동하여 파일을 삭제할 수 없습니다. 우리는 Microsoft가 야기한 것에 대해 비난을 받고 있습니다.


저는 Excel 개발자이며 이런 일이 발생했을 때 분명히 고통을 느꼈습니다. 다행히도 Excel이 실행될 때에도 VBA에서 MSForms.exd 파일의 이름을 바꾸면 해결 방법을 찾을 수 있었으며 문제를 해결할 수도 있습니다. 스프레드 시트를 배포해야하는 Excel 개발자는 스프레드 시트에 다음 VBA 코드를 추가하여 MS 업데이트에 영향을주지 않도록 할 수 있습니다.

이 코드를 모든 모듈에 배치하십시오.

Public Sub RenameMSFormsFiles() 
  Const tempFileName As String = "MSForms - Copy.exd"  
  Const msFormsFileName As String = "MSForms.exd"  
  On Error Resume Next 

  'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd file  
  RenameFile Environ("TEMP") & "\Excel8.0\" & msFormsFileName, Environ("TEMP") & "\Excel8.0\" & tempFileName 
  'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd file  
  RenameFile Environ("TEMP") & "\VBE\" & msFormsFileName, Environ("TEMP") & "\VBE\" & tempFileName 
End Sub  

Private Sub RenameFile(fromFilePath As String, toFilePath As String) 
  If CheckFileExist(fromFilePath) Then 
      DeleteFile toFilePath  
      Name fromFilePath As toFilePath  
  End If  
End Sub

Private Function CheckFileExist(path As String) As Boolean 
  CheckFileExist = (Dir(path) <> "")  
End Function  

Private Sub DeleteFile(path As String) 
  If CheckFileExist(path) Then 
      SetAttr path, vbNormal  
      Kill path  
  End If  
End Sub    

RenameMSFormsFiles 서브 루틴은 C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\C:\Users\[user.name]\AppData\Local\Temp\VBE\폴더 에있는 MSForms.exd 파일의 이름 을 MSForms-Copy.exd로 바꾸려고합니다.

Then call the RenameMSFormsFiles subroutine at the very beginning of the Workbook_Open event.

Private Sub Workbook_Open() 
  RenameMSFormsFiles  
End Sub

The spreadsheet will try to rename the MSForms.exd files when it opens. Obviously, this is not a perfect fix:

  1. The affected user will still experience the ActiveX control errors when running the VBA code the very first time opening the spreadsheet. Only after executing the VBA code once and restarting Excel, the issue is fixed. Normally when a user encounters a broken spreadsheet, the knee-jerk reaction is to close Excel and try to open the spreadsheet again. :)
  2. The MSForms.exd files are renamed every time the spreadsheet opens, even when there's no issue with the MSForms.exd files. But the spreadsheet will work just fine.

At least for now, Excel developers can continue to distribute their work with this workaround until Microsoft releases a fix.

I've posted this solution here.


With Windows 8.1 I couldn't find any .exd files using windows search. On the other hand, a cmd command dir *.exd /S found the one file on my system.


Advice in KB and above didn't work for me. I discovered that if one Excel 2007 user (with or without the security update; not sure of exact circumstances that cause this) saves the file, the original error returns.

I discovered that the fastest way to repair the file again is to delete all the VBA code. Save. Then replace the VBA code (copy/paste). Save. Before attempting this, I delete the .EXD files first, because otherwise I get an error on open.

In my case, I cannot upgrade/update all users of my Excel file in various locations. Since the problem comes back after some users save the Excel file, I am going to have to replace the ActiveX control with something else.


Simplified instructions for end-users. Feel free to copy/paste the following.

Here’s how to fix the problem when it comes up:

  1. Close all your Office programs and files.
  2. Open Windows Explorer and type %TEMP% into the address bar, then press Enter. This will take you into the system temporary folder.
  3. Locate and delete the following folders: Excel8.0, VBE, Word8.0
  4. Now try to use your file again, it shouldn't have any problems.

You might need to wait until the problem occurs in order for this fix to work. Applying it prematurely (before the Windows Update gets installed on your system) won't help.


The best source of information and updates on this issue I could find is in the TechNet Blogs » The Microsoft Excel Support Team Blog (as mentioned):

Form Controls stop working after December 2014 Updates (Updated March 10, 2015)

On March 2015 a hotfix was released in addition to the automated fix-it and manual instructions, and it's available on Windows Update as well.

The latest update and fix from Microsoft: 3025036 "Cannot insert object" error in an ActiveX custom Office solution after you install the MS14-082 security update

STATUS: Update March 10, 2015:

Hotfixes for this issue have been released in the March 2015 Updates for Office 2007, 2010 & 2013.

General info about the problem:

For some users, Form Controls (FM20.dll) are no longer working as expected after installing MS14-082 Microsoft Office Security Updates for December 2014. Issues are experienced at times such as when they open files with existing VBA projects using forms controls, try to insert a forms control in to a new worksheet or run third party software that may use these components.

https://technet.microsoft.com/en-us/library/security/ms14-082.aspx

You may receive errors such as: "Cannot insert object"; "Object library invalid or contains references to object definitions that could not be found"; "The program used to create this object is Forms. That program is either not installed on your computer or it is not responding. To edit this object, install Forms or ensure that any dialog boxes in Forms are closed." [...] Additionally, you may be unable to use or change properties of an ActiveX control on a worksheet or receive an error when trying to refer to an ActiveX control as a member of a worksheet via code.

Manual and additional solutions:

Scripting solution:

Because this problem may affect more than one machine, it is also possible to create a scripting solution to delete the EXD files and run the script as part of the logon process using a policy. The script you would need should contain the following lines and would need to be run for each USER as the .exd files are USER specific.

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

Additional step:

If the steps above do not resolve your issue, another step that can be tested (see warning below):

  1. On a fully updated machine and after removing the .exd files, open the file in Excel with edit permissions.

  2. Open Visual Basic for Applications > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile VBAProject.

  3. Save and reopen the file. Test for resolution.

If resolved, provide this updated project to additional users.

Warning: If this step resolves your issue, be aware that after deploying this updated project to the other users, these users will also need to have the updates applied on their systems and .exd files removed as well.


I did finally find this answer on the official Microsoft KB:

http://support.microsoft.com/kb/3025036/EN-US

No new information here than what we have in previous answers, but at least it acknowledges that Microsoft is aware of the issue.


I know many answers have already been posted for this, but neither one answer independently worked for my site. So here is what worked for me:

Step 1: Uninstall the following updates - KB2920789, KB2920790, KB2920792, KB2920793, KB2984942, KB2596927

Step 2: Hide these updates so they do not get installed on subsequent reboots

Step 3: Delete folder Excel8.0 from C:\Users\<>\AppData\Local\Temp

Step 4: Restart workstatiion (I would also make sure the above mentioned KBs did not inadvertently get applied)


I want to provide an answer that worked as the only thing for me (I realize that I might be the only one ever). I had in one macro that I was calling using the ribbon. It had the following code:

colStore = new Collection

I wasn't aware that it throws an error so I was baffled and tried everything in here. The button just stopped working and I couldn't get it to work. When I noticed the error and corrected it to:

Set colStore = new Collection

It started working again. Absolutely strange if you ask me but maybe it helps someone out there who was as desperate as me.

참고URL : https://stackoverflow.com/questions/27411399/microsoft-excel-activex-controls-disabled

반응형