Could not load an object because it is not available on this machine excel

Symptoms

When you start Excel or use the Microsoft Forecaster Excel Add-in, you receive this error message:

Microsoft Forms — Could not load an object because it is not available on this machine

Cause

The Excel Add-in engine did not register properly.

Resolution

Manually register the add in engine.

  1. Close Excel

  2. Select Run from the Start menu and then type: regsvr32 C:Program FilesFRx SoftwareFRx Forecaster ComponentsFCAddin.ocx

NOTE: Your path may be different, so use Windows Explorer to locate the FCAddin.ocx file and enter the appropriate path for the file.

References

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Symptoms

When you start Excel or use the Microsoft Forecaster Excel Add-in, you receive this error message:

Microsoft Forms — Could not load an object because it is not available on this machine

Cause

The Excel Add-in engine did not register properly.

Resolution

Manually register the add in engine.

  1. Close Excel

  2. Select Run from the Start menu and then type: regsvr32 C:Program FilesFRx SoftwareFRx Forecaster ComponentsFCAddin.ocx

NOTE: Your path may be different, so use Windows Explorer to locate the FCAddin.ocx file and enter the appropriate path for the file.

References

Need more help?

Внимание, откроется в новом окне.
PDFПечать

Ошибка «Could not load an object because it is not avilable on this machine» при вызове любого пункта меню программы «АТТЕСТАЦИЯ-5.1» в большинстве случаев возникает из-за не корректно установленного компонента MSCAL.ocx.

1. Для диагностики данной проблемы необходимо выполнить вызов календаря в любом протоколе (создать любой протокол и нажать кнопку «Дата оценки» на панели инструментов). Если календарь не откроется, тогда необходимо выполнить действия, описанные в пункте 2.

2. Установка компонента:
2.1. Закрыть все программы.
2.2. Перейти в каталог установки программы «Аттестация-5.1» ( «C:Program Files..Аттестация-5.1»).
2.3. Запустить файл mscal_update.exe (с правами администратора), как показано на рисунке.
2.4. Пройти установку файла обновления.

Далее, запустите программу и проверьте вызов календаря (п.1).

3. Если проблема не решится с использованием данного материала, необходимо отправить диагностическую информацию на адрес att_support@mail.ru.

Для получения диагностической информации необходимо перейти в каталог установки программы «Аттестация» ( «C:Program Files..Аттестация-5.1»)и запустить файл diag_att_ctls5.exe.

Признак корректной установки компонентов:

Test 1: execute code 101
Test 2: execute code 201
Test 3: execute code 301
Test 4: execute code 401
Test 5: execute code 501
Test 6: execute code 601

Если коды по какому-либо тесту отличаются, значит существует проблема в установке компонентов.

4. Дополнение: Было зафиксировано несколько случаев проявления данной ошибки из-за блокировки установки компонентов программы во время инсталляции дистрибутива (setup.exe). В связи с этим, если проблема не решится с использованием рекомендаций по п.2 необходимо выполнить повторную установку дистрибутива (setup.exe) в режиме отключенного антивирусного ПО и повторно отправить/проверить результаты диагностики по п.3.

5. На рисунке изображен файл с именем «mscal_update.exe», на другой системе расширение «.exe» может не отображаться. В этом случае имя файла будет «mscal_update».

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

Добрый день!

Excel 2013. При подключении надстройки наблюдаются несколько сообщений об ошибке «Could not load some objects because they are not available on this machine.»
Проблема стала возникать при удалении предыдущей версии Office 2010.
Как починить?

Изменено: neqkeet22.08.2017 18:03:39

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

В Tools->Refferences путь к некоторым библиотекам прописан по месту расположения надстройки PLEX.
Например «ActiveMovie control type library» указан путь @user@Documentsquartz.dll
Хотя данная библиотека должна находиться в папке system 32.
Изменить расположение на корректное не получается. Библиотека активируется только при перемещении в указанную выше папку.

 

Никаких внешних подключаемых библиотек в коде PLEX не используется принципиально.
Тем более ActiveMovie control type library (что это?)

Что у вас за версия Office? Лицензия или пиратка?
Как вариант, попробуйте восстановить через Панель управления — Программы и компоненты — Office — Восстановить  

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

#4

23.08.2017 12:25:46

Версия 15.0.4420.1017. Корпоративная лицензия.
Переустановил офис, не помогло.

Проблема именно с надстройкой. Когда подключаю — появляются сообщения Microsoft Forms «Could not load some objects because they are not available on this machine.»

При перемещении надстройки в другую папку — путь некоторых references меняется на путь надстройки PLEX. Если необходим список всех библиотек, могу предоставить.

Макросы работают не все, например:

Ошибка с «Вып. список» на строчке workrng.Text = Selection.Address — Run Time Error ‘424’ Object required

Код
Private Sub UserForm_Activate()
    workrng.Text = Selection.Address
    Call EnabledOptions
End Sub

Ошибка с «Только видимые»  — Method or data member not found
на строчке Me.refFrom.SetFocus макроса

Код
Private Sub btnOK_Click()

'проверяем заполнение формы
    On Error Resume Next
    Set rngFrom = Range(refFrom.Text)
    Set rngTo = Range(refTo.Text).Cells(1, 1)
    On Error GoTo 0

    If TypeName(rngFrom) <> "Range" Then
        MsgBox "Некорректный адрес копируемого диапазона.", vbCritical + vbOKOnly, "Ошибка ввода"
        Me.refFrom.SetFocus
        Exit Sub

Изменено: neqkeet23.08.2017 13:03:44

 

The_Prist

Пользователь

Сообщений: 13962
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

Снимите галочки со всех пунктов напротив библиотек, отмеченных MISSING. Такие баги могут возникать и при установке на корпоративных ПК, где развертывание офиса осуществляется «сриптами» со стороны админов.

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

The_Prist, В том то и дело, что галочек с MISSING нет. Подключены только:

Visual Basic for Applications,
Microsoft Excel 15.0 Object Library, (две одинаковых библиотеки при подключении Plex)
Microsoft Forms 2.0 Object Library (Только при подключении Plex, отключить при работающем Plex нельзя)
OLE Automation

 

The_Prist

Пользователь

Сообщений: 13962
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

Есть подозрение, что возникает конфликт версий. Я бы попробовал удалить офис, вычистить все папки офиса полностью, почистить реестр, чтобы удалить все следы предыдущих версий. Установить новую версию офиса. Попробовать подключить надстройку.

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

The_Prist, подскажите, как грамотно произвести чистку? Особенно по части реестра?

 

The_Prist

Пользователь

Сообщений: 13962
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

Вот здесь думаю лучше обратиться в Ваш ИТ отдел. Потому что могут быть нюансы и я лично не хочу быть крайним, если вдруг что-то удалите лишнее :) Но в общем случае, т.к. проблема с элементами форм, то обычно порядок такой:
1. Удаляете через Панель управления Microsoft Office
2. Находите папку MicrosoftForms. Для Windows 7 и выше это как правило папка: C:Users%USERNAME%AppDataRoamingMicrosoftForms. В неё можно быстро попасть через команду Выполнить. Пуск -Выполнить —%APPDATA%MicrosoftForms и нажмите Enter.
По хорошему можно удалить полностью эту папку, но беда в том, что она может использоваться другими приложениями Microsoft(вне офиса) и тогда это может повлиять на работу этих программ. Точнее это могут знать только Ваши ИТ-ники. Если будете делать на свой страх и риск, то лучше удалить только те файлы, у которых расширение EXD.

Еще есть рекомендации от самого Microsoft:

https://support.office.com/ru-ru/article/Удаление-Office-с-компьютера-9dd49b83-264a-477a-8fcc-2fdf5d…

P.S. Вот, вспомнил — ведь была в свое время тема с элементами…Попробуйте рекомендации отсюда:

Элементы ActiveX перестали работать или ведут себя непредсказуемо

Вполне возможно, что и в Вашем случае поможет.

Изменено: The_Prist23.08.2017 21:29:38

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

3ooM

Пользователь

Сообщений: 17
Регистрация: 01.02.2014

neqkeet, вы смогли решить данную проблему?

 

У меня решилось обновлением Office 2013..  

 

casimirus

Пользователь

Сообщений: 1
Регистрация: 30.01.2017

#12

26.02.2020 09:34:54

Такая же проблема появилась при установке Excel 2013 поверх Excel 2010. Помогло удаление, исправление ошибок реестра CCleanerом и восстановление офиса.

Мар 6, 2014
Posted by Rock’n Root author
s-a
0 comments

В некотором царстве, в некотором государстве…

В одной компании используется специфическое ПО, к которому написаны ещё более специфические приложения в экселе с использованием Visual Basic для генерации отчётов. Когда не установлен Access (а он часто не входит в компоненты офиса) этот отчёт выдаёт подобную ошибку:

Microsoft Forms: Could not load an object because it is not available on this machine

mscal.ocx

Избавляемся от неё просто. Ищем на другом компьютере с такой же версией офиса, где установлен Access, файл mscal.ocx (обычно он лежит в c:program filesmicrosoft officeofficeXX, где XX – версия офиса), копируем его оттуда. Потом регистрируем его в командной строке:

regsvr32 "c:program filesmicrosoft officeofficeXXmscal.ocx"

vb-error

После этого данная ошибка должна исчезнуть…

I have an Excel add-in on a VM that uses the «Microsoft TreeView Control, version 6.0» as a part of Microsoft Windows Common Controls 6.0 (SP6), located at C:Windowssystem32MSCOMCTL.ocx. The properties window on forms that use the TreeView control show the control as [TreeView control name] TreeView3. Everything works great, and I don’t receive any errors.

I also have copies of the working VM with the same Excel add-in, but I receive a Microsoft Forms error that reads «Could not load an object because it is not available on this machine.» when I open Excel and the add-in loads.

I am able to re-create the forms, using the same «Microsoft TreeView Control, version 6.0» (same file location and reference), but this TreeView control appears as [TreeView control name] TreeView2 and the error no longer appears.

Instead of re-creating all the forms that use the TreeView2 control, how can I prevent the issue from happening in the first place? The machines are obviously not exact copies. With the exception of .NET v4 installed on the working machine, I don’t know what has changed that corrected the issue. It is my understanding that the Windows Common Controls should not be impacted by simply installing .NET v4 on the machines that have the error.

EDIT:
Installed the following and it did not work:
https://www.microsoft.com/en-us/download/details.aspx?id=10019

Also took a shot and installed .NET v4, and still no luck.

Specifications on working machine:
Windows 7 Professional SP1
Excel 2010, Version: 14.0.7162.5000 (32-bit)
ComputerHKLMSOFTWAREMicrosoftNET Framework SetupNDP and it has v2.0.50727, v3.0, v3.5, and v4

Specifications on machines with the issue:
Windows 7 Professional SP1
Excel 2010, Version: 14.0.7162.5000 (32-bit)
ComputerHKLMSOFTWAREMicrosoftNET Framework SetupNDP and it has v2.0.50727, v3.0, v3.5

EDIT #2: failed to mention that the machine with the issue is a 64-bit OS

Information from Registry for versions of TreeView controls on Working machine and Non-Working machine

Working Machine
ComputerHKEY_CLASSES_ROOTMSComctlLib.TreeCtrlCurVer — MSComctlLib.TreeCtrl.2

ComputerHKEY_CLASSES_ROOTCLSID{C74190B6-8589-11D1-B16A-00C0F0283628}Version — 2.1

Windows 7 Professional SP1 32-bit

Non-Working Machine
ComputerHKEY_CLASSES_ROOTMSComctlLib.TreeCtrlCurVer — MSComctlLib.TreeCtrl.2

ComputerHKEY_CLASSES_ROOTWow6432NodeCLSID{C74190B6-8589-11D1-B16A-00C0F0283628}Version — 2.0

Windows 7 Professional SP1 64-bit

I have an Excel add-in on a VM that uses the «Microsoft TreeView Control, version 6.0» as a part of Microsoft Windows Common Controls 6.0 (SP6), located at C:Windowssystem32MSCOMCTL.ocx. The properties window on forms that use the TreeView control show the control as [TreeView control name] TreeView3. Everything works great, and I don’t receive any errors.

I also have copies of the working VM with the same Excel add-in, but I receive a Microsoft Forms error that reads «Could not load an object because it is not available on this machine.» when I open Excel and the add-in loads.

I am able to re-create the forms, using the same «Microsoft TreeView Control, version 6.0» (same file location and reference), but this TreeView control appears as [TreeView control name] TreeView2 and the error no longer appears.

Instead of re-creating all the forms that use the TreeView2 control, how can I prevent the issue from happening in the first place? The machines are obviously not exact copies. With the exception of .NET v4 installed on the working machine, I don’t know what has changed that corrected the issue. It is my understanding that the Windows Common Controls should not be impacted by simply installing .NET v4 on the machines that have the error.

EDIT:
Installed the following and it did not work:
https://www.microsoft.com/en-us/download/details.aspx?id=10019

Also took a shot and installed .NET v4, and still no luck.

Specifications on working machine:
Windows 7 Professional SP1
Excel 2010, Version: 14.0.7162.5000 (32-bit)
ComputerHKLMSOFTWAREMicrosoftNET Framework SetupNDP and it has v2.0.50727, v3.0, v3.5, and v4

Specifications on machines with the issue:
Windows 7 Professional SP1
Excel 2010, Version: 14.0.7162.5000 (32-bit)
ComputerHKLMSOFTWAREMicrosoftNET Framework SetupNDP and it has v2.0.50727, v3.0, v3.5

EDIT #2: failed to mention that the machine with the issue is a 64-bit OS

Information from Registry for versions of TreeView controls on Working machine and Non-Working machine

Working Machine
ComputerHKEY_CLASSES_ROOTMSComctlLib.TreeCtrlCurVer — MSComctlLib.TreeCtrl.2

ComputerHKEY_CLASSES_ROOTCLSID{C74190B6-8589-11D1-B16A-00C0F0283628}Version — 2.1

Windows 7 Professional SP1 32-bit

Non-Working Machine
ComputerHKEY_CLASSES_ROOTMSComctlLib.TreeCtrlCurVer — MSComctlLib.TreeCtrl.2

ComputerHKEY_CLASSES_ROOTWow6432NodeCLSID{C74190B6-8589-11D1-B16A-00C0F0283628}Version — 2.0

Windows 7 Professional SP1 64-bit

Problem

User launches Perspectives. User receives an error.

User clicks OK. A second error appears.

Symptom

Error #1:

Microsoft Forms

Could not load an object because it is not available on this machine.

[OK]

Error #2:

Microsoft Visual Basic for Applications

Compile error in hidden module: MenuFuncs.

This error commonly occurs when code is incompatible with the version, platform, or architecture of this application. Click «Help» for information on how to correct this error.

Cause

Incompatible/unregistered shared Microsoft file («mscomctl.ocx») on client device.

More Information:

Microsoft had a security update in August 2012 (see http://technet.microsoft.com/en-us/security/bulletin/ms12-aug) which updated the mscomctl.ocx common control file (which is required by Perspectives to integrate with Excel).

Environment

Client device using Excel 2007 or 2010.

Resolving The Problem

Fix:

Download the latest Windows security updates to obtain the latest common control file.

Workaround:

It is possible to manually register a ‘good’ version of «mscomctl.ocx» by copying the file (from a working client device) and manually registering the file.

In one real-life case:

  • bad‘ version of ‘mscomctl.ocx’ = 6.01.9818 (6.1.98.18)

  • good‘ version of ‘mscomctl.ocx’ = 6.01.9839 (6.1.98.39)

The steps to register the new OCX file is:
1. Click Start, type cmd.
2. Right-click the cmd icon, and then click Run as Administrator.
3. Depending on your operating system:

  • For 64-bit operating systems, type the following:

Regsvr32 /u «C:WindowsSysWOW64MSCOMCTL.OCX»
Regsvr32 «C:WindowsSysWOW64MSCOMCTL.OCX»

  • For 32-bit operating systems, type the following:

Regsvr32 /u «C:WindowsSystem32MSCOMCTL.OCX»
Regsvr32 «C:WindowsSystem32MSCOMCTL.OCX»

Related Information

[{«Product»:{«code»:»SS9RXT»,»label»:»Cognos TM1″},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»TM1 Perspectives»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»10.1.1″,»Edition»:»All Editions»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

Добрый день!

Excel 2013. При подключении надстройки наблюдаются несколько сообщений об ошибке «Could not load some objects because they are not available on this machine.»
Проблема стала возникать при удалении предыдущей версии Office 2010.
Как починить?

Изменено: neqkeet22.08.2017 18:03:39

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

В Tools->Refferences путь к некоторым библиотекам прописан по месту расположения надстройки PLEX.
Например «ActiveMovie control type library» указан путь @user@Documentsquartz.dll
Хотя данная библиотека должна находиться в папке system 32.
Изменить расположение на корректное не получается. Библиотека активируется только при перемещении в указанную выше папку.

 

Никаких внешних подключаемых библиотек в коде PLEX не используется принципиально.
Тем более ActiveMovie control type library (что это?)

Что у вас за версия Office? Лицензия или пиратка?
Как вариант, попробуйте восстановить через Панель управления — Программы и компоненты — Office — Восстановить  

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

#4

23.08.2017 12:25:46

Версия 15.0.4420.1017. Корпоративная лицензия.
Переустановил офис, не помогло.

Проблема именно с надстройкой. Когда подключаю — появляются сообщения Microsoft Forms «Could not load some objects because they are not available on this machine.»

При перемещении надстройки в другую папку — путь некоторых references меняется на путь надстройки PLEX. Если необходим список всех библиотек, могу предоставить.

Макросы работают не все, например:

Ошибка с «Вып. список» на строчке workrng.Text = Selection.Address — Run Time Error ‘424’ Object required

Код
Private Sub UserForm_Activate()
    workrng.Text = Selection.Address
    Call EnabledOptions
End Sub

Ошибка с «Только видимые»  — Method or data member not found
на строчке Me.refFrom.SetFocus макроса

Код
Private Sub btnOK_Click()

'проверяем заполнение формы
    On Error Resume Next
    Set rngFrom = Range(refFrom.Text)
    Set rngTo = Range(refTo.Text).Cells(1, 1)
    On Error GoTo 0

    If TypeName(rngFrom) <> "Range" Then
        MsgBox "Некорректный адрес копируемого диапазона.", vbCritical + vbOKOnly, "Ошибка ввода"
        Me.refFrom.SetFocus
        Exit Sub

Изменено: neqkeet23.08.2017 13:03:44

 

The_Prist

Пользователь

Сообщений: 14181
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

Снимите галочки со всех пунктов напротив библиотек, отмеченных MISSING. Такие баги могут возникать и при установке на корпоративных ПК, где развертывание офиса осуществляется «сриптами» со стороны админов.

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

The_Prist, В том то и дело, что галочек с MISSING нет. Подключены только:

Visual Basic for Applications,
Microsoft Excel 15.0 Object Library, (две одинаковых библиотеки при подключении Plex)
Microsoft Forms 2.0 Object Library (Только при подключении Plex, отключить при работающем Plex нельзя)
OLE Automation

 

The_Prist

Пользователь

Сообщений: 14181
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

Есть подозрение, что возникает конфликт версий. Я бы попробовал удалить офис, вычистить все папки офиса полностью, почистить реестр, чтобы удалить все следы предыдущих версий. Установить новую версию офиса. Попробовать подключить надстройку.

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

neqkeet

Пользователь

Сообщений: 84
Регистрация: 11.03.2016

The_Prist, подскажите, как грамотно произвести чистку? Особенно по части реестра?

 

The_Prist

Пользователь

Сообщений: 14181
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

Вот здесь думаю лучше обратиться в Ваш ИТ отдел. Потому что могут быть нюансы и я лично не хочу быть крайним, если вдруг что-то удалите лишнее :) Но в общем случае, т.к. проблема с элементами форм, то обычно порядок такой:
1. Удаляете через Панель управления Microsoft Office
2. Находите папку MicrosoftForms. Для Windows 7 и выше это как правило папка: C:Users%USERNAME%AppDataRoamingMicrosoftForms. В неё можно быстро попасть через команду Выполнить. Пуск -Выполнить —%APPDATA%MicrosoftForms и нажмите Enter.
По хорошему можно удалить полностью эту папку, но беда в том, что она может использоваться другими приложениями Microsoft(вне офиса) и тогда это может повлиять на работу этих программ. Точнее это могут знать только Ваши ИТ-ники. Если будете делать на свой страх и риск, то лучше удалить только те файлы, у которых расширение EXD.

Еще есть рекомендации от самого Microsoft:

https://support.office.com/ru-ru/article/Удаление-Office-с-компьютера-9dd49b83-264a-477a-8fcc-2fdf5d…

P.S. Вот, вспомнил — ведь была в свое время тема с элементами…Попробуйте рекомендации отсюда:

Элементы ActiveX перестали работать или ведут себя непредсказуемо

Вполне возможно, что и в Вашем случае поможет.

Изменено: The_Prist23.08.2017 21:29:38

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

3ooM

Пользователь

Сообщений: 17
Регистрация: 01.02.2014

neqkeet, вы смогли решить данную проблему?

 

У меня решилось обновлением Office 2013..  

 

casimirus

Пользователь

Сообщений: 1
Регистрация: 30.01.2017

#12

26.02.2020 09:34:54

Такая же проблема появилась при установке Excel 2013 поверх Excel 2010. Помогло удаление, исправление ошибок реестра CCleanerом и восстановление офиса.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Option Explicit
Option Base 1
 
Private Declare Function RegOpenKeyEx& Lib 'advapi32' Alias 'RegOpenKeyExA' (ByVal hKey&, ByVal lpSubKey$, ByVal ulOptions&, ByVal samDesired&, ByRef phkResult&)
Private Declare Function RegQueryValueEx& Lib 'advapi32' Alias 'RegQueryValueExA' (ByVal hKey&, ByVal lpValueName$, ByVal lpReserved&, ByRef lpType&, ByVal lpData$, ByRef lpcbData&)
Private Declare Function RegSetValueEx& Lib 'advapi32' Alias 'RegSetValueExA' (ByVal hKey&, ByVal lpValueName$, ByVal Reserved&, ByVal dwType&, ByVal lpData$, ByVal cbData&)
Private Declare Function RegCreateKeyEx& Lib 'advapi32' Alias 'RegCreateKeyExA' (ByVal hKey&, ByVal lpSubKey$, ByVal Reserved&, ByVal lpClass$, ByVal dwOptions&, ByVal samDesired&, ByRef lpSecurityAttributes&, ByRef phkResult&, ByRef lpdwDisposition&)
Private Declare Function RegCloseKey& Lib 'advapi32' (ByVal hKey&)
 
Private Function GetKeyValue(KeyName$, SubKeyRef$, ByRef KeyVal$) As Boolean
'Const KeyRoot& = &H80000002 'Local_mashine
Const KeyRoot& = &H80000000 'HKEY_CLASSES_ROOT
 
Const KEY_ALL_ACCESS& = 131135
Const ERROR_SUCCESS& = 0
Const REG_SZ& = 1
Const REG_DWORD& = 4
Const KeyValSize& = 1024
 
Dim i&
Dim hKey&
Dim hDepth&
Dim KeyValType&
Dim tmpVal$
 
If RegOpenKeyEx(KeyRoot, KeyName, ERROR_SUCCESS, KEY_ALL_ACCESS, hKey) <> ERROR_SUCCESS Then GoTo GetKeyError
i = KeyValSize
tmpVal = String$(KeyValSize, ERROR_SUCCESS)
If RegQueryValueEx(hKey, SubKeyRef, ERROR_SUCCESS, KeyValType, tmpVal, i) <> ERROR_SUCCESS Then GoTo GetKeyError
If (Asc(Mid(tmpVal, i, 1)) = ERROR_SUCCESS) Then
    tmpVal = Left(tmpVal, i - 1)
Else
    tmpVal = Left(tmpVal, i)
End If
 
'Determine Key Value Type For Conversion...
Select Case KeyValType
    Case REG_SZ
    KeyVal = tmpVal
    Case REG_DWORD
    For i = Len(tmpVal) To 1 Step -1:  KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1))): Next i
    KeyVal = Format$('&h' + KeyVal)
End Select
 
GetKeyValue = True
Call RegCloseKey(hKey)
Exit Function
 
GetKeyError:
KeyVal = ''
GetKeyValue = False
Call RegCloseKey(hKey)
End Function

Сделал файл, в нем для выбора даты пользователем использую форму с календариком, календарик стандартный из MSCAL.OCX. Тут и появились проблемы при открытии на компьютере где этот компонент офиса не установлен вылетает сообщение «Could not load object because it is not available on this machine» после нажатия на ok файл открывается но календарик из формы исчезает! файл может открываться почти в любой версии офиса на нескольких сотнях компьютеров с различным виндовсом! Отсюдова вопрос как избежать исчезновения календарика!!! Может возможно программно отследить этот момент и избежать его. Может возможно как то проверить наличие этого компонента и если его нет скопировать соответствующий файл в нужную папку? Может есть способы внеднить этот календарик в сам файл экселя?

Не пытайтесь спорить с дебилом. Иначе вы опуститесь до его уровня. Где он задавит вас своим опытом.


1. При создании кода для широкого распространения лучше использовать только элементы библиотек, входящих в Офис по умолчанию. Поэтому, хоть я сам, например, очень люблю календарь MonthView, но использую его только в кодах «для себя». А для отдачи на сторону приходится использовать любой из написанных народом календарей из стандартных элементов. Например, можно мой JP_Сalendar или Выпадающий календарь от Володи (VovaK) , но если поискать, то их множество самых разных.
2. Если всё-таки использовать календарь из разряда «есть, но не у всех», то надо при загрузке проекта проверять референсы на миссинг. Как это сделать могу посмотреть завтра (у меня основная «копилка» на компе на работе и там это в каком-то из примеров было)
3. Внедрить dll календаря в файл Excel’я вряд ли получится без больших затруднений.

С уважением, Алексей


Спасибо за советы! Если вас не затруднит посмотрите в копилке пример пожалуйста

Не пытайтесь спорить с дебилом. Иначе вы опуститесь до его уровня. Где он задавит вас своим опытом.


Я, как всегда, чертовски адекватен… Email: pilipnikop@yandex.ua WM Z206653985942, R334086032478, U238399322728, E332314026771


Можно, например, на компе, где всё работает, создать список необходимых ссылок (в примере ещё и их пути выводятся, а из путей можно и имена файлов извлечь)

Sub ListVBRefs()
   On Error Resume Next
   Dim oRef As Object '  или As VBIDE.Reference если заранее подключить библиотеку Microsoft Visual Basic for Applications Extensibility 5.3 (раннее связывание)
   For Each oRef In ThisWorkbook.VBProject.References
Debug.Print oRef.Name & Chr(10) & oRef.FullPath
   Next
End Sub

и сравнивать этот список при загрузке файла с тем, что есть на новом компе.

А вот так можно просто проверять ссылки на MISSING:

Sub ListVBRefs_IsBroken()
   On Error Resume Next
   Dim oRef As Object '  или As VBIDE.Reference если заранее подключить библиотеку Microsoft Visual Basic for Applications Extensibility 5.3 (раннее связывание)
   For Each oRef In ThisWorkbook.VBProject.References
Debug.Print oRef.Name & vbTab & IIf(oRef.IsBroken, "MISSING", "OK")
   Next
End Sub

На вскидку нашёл ещё и статейку Удаление битых ссылок на библиотеки методом References.Remove, но там про Access. Хотя, я думаю, в принципах работы со ссылками на библиотеки поковыряться можно и на том примере.
Ещё можно посмотреть статью Missing References In VBA. Там в разделе Resolving Missing References можно что-нибудь ценное выцепить.

С уважением, Алексей


Не пытайтесь спорить с дебилом. Иначе вы опуститесь до его уровня. Где он задавит вас своим опытом.


К стати, могут быть ещё одни «вилы» — более старая версия .dll или .ocx у пользователя.
Я с этим столкнулся, когда у некоторых из пользователей не работал ListView из MSCOMCTL.OCX, который, хотя и, естественно, у пользователя на компе был, но версия его была старая.
Я тогда до версии файла добирался такой процедурой:

Sub FileVersion()
   Dim sPath$: sPath = "C:WindowsSystem32"
   Dim sFileName$: sFileName = "MSCOMCTL.OCX"
   Dim iNum%, oFolder As Object, oFile As Object
   'Set oFolder = CreateObject("Shell.Application").Namespace(CVar(sPath))
   Set oFolder = CreateObject("Shell.Application").Namespace((sPath))
   Set oFile = oFolder.ParseName(sFileName)
   iNum = 156
Debug.Print oFolder.GetDetailsOf(oFolder.Items, iNum) & " : " & oFolder.GetDetailsOf(oFile, iNum)
   iNum = 271
Debug.Print oFolder.GetDetailsOf(oFolder.Items, iNum) & " : " & oFolder.GetDetailsOf(oFile, iNum)
End Sub

Но по индексу считывать расширенные параметры, как выяснилось, не очень хорошо, т.к. в разных средах он может меняться.
Тогда пришлось слепить такую функцию:

Sub testGetFileParam()
Debug.Print GetFileParam("C:WindowsSystem32", "MSCOMCTL.OCX", "Версия файла")
Debug.Print GetFileParam("C:WindowsSystem32", "MSCOMCTL.OCX", "Версия продукта")
End Sub

Function GetFileParam(sPath$, sFileName$, sParamName)
   Dim oFile, i%
   sPath = IIf(Right(sPath, 1) = "", sPath, sPath & "")
   GetFileParam = "Error!"
   With CreateObject("Shell.Application").Namespace(CVar(sPath))
      Set oFile = .ParseName(sFileName)
      For i = 0 To 299
         If .GetDetailsOf(.Items, i) = sParamName Then GetFileParam = .GetDetailsOf(oFile, i): Exit For
      Next i
   End With
End Function

С уважением, Алексей


Мда ковырял ковырял и наковырял очередные грабли в виде в виде «Доверять доступ к объектной модели проектов VBA» все что пока удалось найти по этому вопросу сводиться к Добавление элемента формы кодом с последующим сохранениемт может кто сталкивался с этой проблемой и может еще что то посоветовать

Не пытайтесь спорить с дебилом. Иначе вы опуститесь до его уровня. Где он задавит вас своим опытом.


Poltava,
а может быть всё-таки попробовать версии файлов сравнить на Вашей машине и на той, где не работает?
Или на глючной машине его просто нет и ссылка на библиотеку битая?

С уважением, Алексей


Дело в том что машин не менее 30 и у всех разные версии офиса и виндовса потому принял решение вообще избавиться от этого календарика и взять один из ваших! но понадобиться время на исправление кода вот и хотел по быстрому прикрутить ваш код чтоб при проблемах файл вообще не открывался во избежании порчи! Но по быстрому не получилось ): так как для работы вашего кода должна стоять галочка «Доверять доступ к объектной модели проектов VBA» а ее программная установка из статьи по ссылке в прошлом сообщении выглядит для меня пока весьма муторно :-

Не пытайтесь спорить с дебилом. Иначе вы опуститесь до его уровня. Где он задавит вас своим опытом.


Цитата: Poltava от 13.12.2012, 20:57… для работы вашего кода должна стоять галочка «Доверять доступ к объектной модели проектов VBA»

Да Вы что? Не должно такого быть. Там же стандартные элементы и никаких обращений с целью изменения к самому проекту VBA нет.
Проверьте у себя: попробуйте снимите «гульку», закройте Excel, а потом откройте его, удостоверьтесь в отсутствии «гульки» и откройте файл с календарём. Всё должно и так работать.

С уважением, Алексей


ЦитироватьТам же стандартные элементы

Я имел в виду не календарь, а ваш код для проверки ссылок на MISSING:

Не пытайтесь спорить с дебилом. Иначе вы опуститесь до его уровня. Где он задавит вас своим опытом.


С уважением, Алексей


We are using a set of Excel files on several machines in our company. These files contain a VBA application which utilizes a couple of ActiveX control objects from mscomct2.ocx library (namely, MonthView and DateTimePicker). ActiveX objects are to be displayed in UserForm. Unfortunately the portability of these files seems limited in a very peculiar way.

There appears to be 2 groups of machines:

  • Group A: I can create a Excel file containing MonthView on such machine and work with it on any Group A PC. But when I try to open this file on any machine from Group B, I’m getting a Could not load an object because it is not available on this machine error. However, files with the same ActiveX created on Group B machines work normaly on A machines.
  • Group B: File with an ActiveX in question created on these machines work everywhere (i.e. on any A and B machine). But, as I said earlier, B machines give the error mentioned above when the file with ActiveX saved on A machine is opened.

In one sentence: files created on A machine work only on other A’s, files created on B’s work everywhere!

The strangest thing here is that every machine has mscomct2.ocx registered (once again: I can create the form with the MonthView on any machine in question!). The .ocx itself is in place on each machine and the whole set of registry keys is present (CLSIDs for controls classes, IIDs, typelib ID…). In addition, the data in these registry keys seem to be the same on A and B group machines (GUIDs, ProgIDs, versions etc.). There are slight differences in description strings (values like «Microsoft MonthView Control 6.0 (SP6)») on some machines but this does not seem to affect the situation (some machines in B group have such descriptions different but files created on them still work everywhere).

Naturally, thanks to Murphy’s law, the machine I use to edit these Excel files belongs to Group A, so files saved here are ‘unportable’ to B machines…

The OS and Excel versions don’t seem to affect the situation. For example, one of B machines is working under Win 7 64 bit (Excel 2007), while most others group A and B machines are Win XP Prof (32 bit) SP3, with Excel 2003 installed. So it seems that OS and Excel versions don’t affect compatibility and the problem is somehow connected with ActiveX.

The only ActiveX-related difference between A and B groups I found is the file version of mscomct2.ocx: at least several of A machines have version 6.1.x.x, while Group B has 6.0.x.x. I don’t see how can such difference cause problems (ActiveX are COM objects after all, and according to registry key values, the exposed typelib, com objects and interfaces seem to be the same in all cases). Nevertheless I tried to replace my 6.1.x.x ocx with 6.0.x.x version… and ran into more trouble. What I did is:

  1. regsvr32 /u mscomct2.ocx — completed successfully
  2. Replaced the mscomct2.ocx with file of 6.0.x.x version
  3. regsvr32 mscomct2.ocx — completed successfully

After these steps I tried to make an Excel file with single form containing the MonthView. But when I tried to place a control in the form I’ve got a messagebox with error Class not registered. This is really strange cause everything seem to be registered: the control class, its interfaces, typelib (yes, I’ve checked the registry to be sure). But still the error was there.

After that I did the unregister/replace/register procedure again to go back to my original 6.1.x.x file. That took me back to the original SNAFU situation: I could again install ActiveX to user form and use it, but the Group B machines still gave the error on files saved by my machine.

I assume that the problem of files-with-ActiveX portability and the problem of ocx registration are somehow connected, but I don’t see how. Perhaps there are some additional requirements for registration of an ActiveX in Excel VBA which I don’t know…

The only thing I need is to have the ActiveX object contaned in my Excel file compatible with other machines. Can anyone help me with that?

Update: if you are having problems after installing Security Patch MS12-060 then click here.


Update (Thu Oct 18, 2012): Security Patch MS12-060 also appears to modify the TypeLib information of MSCOMCTL.OCX in the registry. Before the patch, references to MSCOMCTL in the VBA code would resolve to version “2.0” of the library. With MS12-060, this version has been updated to “2.1”. This was discovered using ProcMon on 2 different PC’s, one patch and one unpatched.

The result is that if in your VBA code you make explicit, early bonded, reference to this library or to components in the library such as in “Dim oListItems As MSComctlLib.ListItems“, Excel stores the newer version of MSCOMCTL.OCX in your project. When you transfer the workbook to a PC without the MS12-060 Security Patch (or even without MS12-027) then your project will inevitable fail.

Currently, the only way I found to recover my work (excluding building up the project from scratch inserting one by one all modules) is to add to the registry the node on the MSCOMCTL typeLib for version “2.1” (which is exactly the same as the “2.0” node):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTTypeLib{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}2.1]
@="Microsoft Windows Common Controls 6.0 (SP6)"

[HKEY_CLASSES_ROOTTypeLib{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}2.1]

[HKEY_CLASSES_ROOTTypeLib{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}2.1win32]
@="C:\WINDOWS\system32\MSCOMCTL.OCX"

[HKEY_CLASSES_ROOTTypeLib{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}2.1FLAGS]
@="2"

[HKEY_CLASSES_ROOTTypeLib{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}2.1HELPDIR]
@=""

Remind that this is not a universal solution and it will not allow you to run VBA projects on every PC around, but at least it does allow you to get back to a working system. Hopefully I am able to provide a permanent fix for this issue as well.


Security Patch MS12-027 (Vulnerability in MSCOMCTL.OCX could allow Remote Code Execution) of April 10, 2012 causes a problem that may result in the “Could not load an object because it is not available on this machine” error message when starting Excel with a workbook or an Add-In that uses components from the selected file. Usually a second other error message is also triggered is “Compile error in hidden module: <name of module>“.

To protect your PC, this patch installs an updated version of MSCOMCTL.OCX with the same COM Interface so you can use it without changing one line of code but with a different Class Id (CLSID). Via the Registry all applications seeking the original CLSID are redirected to the new CLSID so that you can continue using it safely. The section of the Registry doing this redirection is “HKLMSOFTWAREMicrosoftInternet ExplorerActiveX Compatibility“.

You may ask yourself: «what does Internet Explorer’s ActiveX Compatibility have to do with Excel?» Well, it does, and it does a lot. Excel scans the same registry section for understanding whether it can safely load a component and what CLSID it should use as an alternative. Try ProcessMonitor and you’ll see.

When you edit an Excel workbook —doesn’t matter the format, XLS/XLA/XLSM/XLAM all have it— on a PC where the patched MSCOMCTL.OCX is installed, then Excel links internally the control to the new CLSID.

In principle the patch integrates flawlessly and you should see no difference when running Excel with a workbook or an Add-In using components from MSCOMCTL.OCX. I heavily rely in my VBA projects on the Microsoft ListView Control 6.0 ActiveX control which is contained in this file and have been able to use it without any trouble.

In the event that opening Excel does trigger the above error message(s), then this link can provide a fix. If you want to read individual info for a specific Office release, click on one of the release numbers: 2003  2007 2010

Office 2000 or 2002 are likely only affected if you have 2003 components installed, for instance when having Outlook 2003 side-by-side with Office 2002.

Wouldn’t it be that if at that point you transfer (or distribute) the Excel workbook or the Excel Add-In to a PC without the Security Patch installed, Excel will look for the new CLSID but cannot find it and that will trigger the above error message. Note that the fix mentioned earlier will not work. As a confirmation of this issue you can open the VBA project, edit a UserForm with such control in design mode and see that the particular control is indeed missing.

My main development environment is based on Windows XP and Excel 2002 and I use various Virtual PC instances running all possible combinations of Windows XP, Vista and 7 with Excel 2000, 2003, 2007 and 2010 32-bit to test the developed applications. Only the main environment is patched with Windows Update but the Virtual PC’s are not.

This week I finished a project and saved the XLS, copied it to the Virtual PC with Excel 2007 and opened it for the transformation in XLSM and to my surprise I got the error. The bad thing is that I can’t open the XLS (nor the XLSM, XLA or XLAM) on any of the mentioned Virtual PC’s because all them give the error.

I even tried to rescue the project starting a blank workbook and importing the UserForms exported from the XLS on the only PC that is working, but nada, niente, nothing, zero success. I deduct from this that in the associated .FRX file there must be a link to the new CLSID but am still unable to find out where. This makes also sense: Excel uses early binding when using ActiveX control at design time, and early binding generally uses CLSID’s and not the component’s class name.

Of course you can redesign the forms by adding the ListView again because on the failing PC there is indeed a valid ListView ActiveX control, but this is quite a PITB and is no guarantee that it will work.

As it looks now, I will need to install the Security Patch everywhere. I am looking if there is a way to bypass this need.

Security Patch MS12-027 cannot be uninstalled, this patch is considered critical and each PC should be updated as soon as possible but this is not always the case.

Update (and temporary solution)

I have found a trick —a Registry hack to be honest— that helps me open and use the failing workbook on un-patched PC’s. This hack consists in telling Excel to use the old interface instead of the new interface.

Note: Excel workbooks or Excel Add-Ins which are edited/saved on a PC with the Registry hack will open/work on both the patched and un-patched PC’s, thus including PC’s having MS12-027 installed.

Keep in mind, and I cannot say this often enough:

Do not change stuff in the Registry unless you are absolutely sure about what you are doing.

For each control you use from MSCOMCTL.OCX you need to add a Key under “HKLMSOFTWAREMicrosoftInternet ExplorerActiveX Compatibility“. The value for each Key is in the following table:

CLSID in new MSCOMCTL.OCX Exposed Component Name
{87DACC48-F1C5-4AF3-84BA-A2A72C2AB959} Microsoft ImageComboBox Control 6.0 (SP6)
{F91CAF91-225B-43A7-BB9E-472F991FC402} Microsoft ImageList Control 6.0 (SP6)
{979127D3-7D01-4FDE-AF65-A698091468AF} Microsoft ListView Control 6.0 (SP6)
{A0E7BF67-8D30-4620-8825-7111714C7CAB} Microsoft ProgressBar Control 6.0 (SP6)
{0B314611-2C19-4AB4-8513-A6EEA569D3C4} Microsoft Slider Control 6.0 (SP6)
{627C8B79-918A-4C5C-9E19-20F66BF30B86} Microsoft StatusBar Control 6.0 (SP6)
{24B224E0-9545-4A2F-ABD5-86AA8A849385} Microsoft TabStrip Control 6.0 (SP6)
{7DC6F291-BF55-4E50-B619-EF672D9DCC58} Microsoft Toolbar Control 6.0 (SP6)
{95F0B3BE-E8AC-4995-9DCA-419849E06410} Microsoft TreeView Control 6.0 (SP6)

Inside each newly created key you must add 2 values, a REG_SZ named AlternateCLSID and a DWORD (32bit) value named Compatibility Flags (remember to includes the space between the 2 words). For convenience (and for finding my hack back quickly) I have added a third REG_SZ value using my name.

Value Name Value Type Value
AlternateCLSID REG_SZ {CLSID of the “old” component including braces}
Compatibility Flags DWORD 0x00000400 (1024)
Dutch.Gemini REG_SZ Backwards compatibility for component ‘whatever’ following MS012-027 (MSCOMCTL.OCX)

To find the old CLSID values, search for the control’s name (2nd column in 1st table) under the Registry branch “HKEY_CLASSES_ROOTCLSID“. Watch out: the same component may have been registered multiple times with different CLSID’s, which occurs when you install updated versions of MSCOMCTL.OCX on the PC. For instance this is the case on my PC with the ListView component . So you may have to make a few attempts before you get it all back working.

Tip: the quickest way to understand what CLSID your system is using is looking for the component’s class name (e.g. MSComctlLib.ListViewCtrl) under “HKEY_CLASSES_ROOT“, read its CurVer key value, locate that key value under the same branch and from that one take the CLSID Key value:

The following registry script redirects the CLSID’s of the patched MSCOMCTL.OCX v6.1.98.33 of November 3, 2011 back to those exposed by v6.1.95.45 of December 20, 2002:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{0B314611-2C19-4AB4-8513-A6EEA569D3C4}]
"AlternateCLSID"="{F08DF954-8592-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft Slider Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{24B224E0-9545-4A2F-ABD5-86AA8A849385}]
"AlternateCLSID"="{1EFB6596-857C-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft TabStrip Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{627C8B79-918A-4C5C-9E19-20F66BF30B86}]
"AlternateCLSID"="{8E3867A3-8586-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft StatusBar Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{7DC6F291-BF55-4E50-B619-EF672D9DCC58}]
"AlternateCLSID"="{66833FE6-8583-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft Toolbar Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{87DACC48-F1C5-4AF3-84BA-A2A72C2AB959}]
"AlternateCLSID"="{DD9DA666-8594-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft ImageComboBox Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{95F0B3BE-E8AC-4995-9DCA-419849E06410}]
"AlternateCLSID"="{C74190B6-8589-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft TreeView Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{979127D3-7D01-4FDE-AF65-A698091468AF}]
"AlternateCLSID"="{BDD1F04B-858B-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft ListView Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{A0E7BF67-8D30-4620-8825-7111714C7CAB}]
"AlternateCLSID"="{35053A22-8589-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft ProgressBar Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{F91CAF91-225B-43A7-BB9E-472F991FC402}]
"AlternateCLSID"="{2C247F23-8591-11D1-B16A-00C0F0283628}"
"Compatibility Flags"=dword:00000400
"Dutch.Gemini"="Backwards compatibility for Microsoft ImageList Control 6.0 (SP6) component following MS012-027 (MSCOMCTL.OCX)"

The following script removes the above keys and values:

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{0B314611-2C19-4AB4-8513-A6EEA569D3C4}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{24B224E0-9545-4A2F-ABD5-86AA8A849385}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{627C8B79-918A-4C5C-9E19-20F66BF30B86}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{7DC6F291-BF55-4E50-B619-EF672D9DCC58}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{87DACC48-F1C5-4AF3-84BA-A2A72C2AB959}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{95F0B3BE-E8AC-4995-9DCA-419849E06410}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{979127D3-7D01-4FDE-AF65-A698091468AF}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{A0E7BF67-8D30-4620-8825-7111714C7CAB}]
[-HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerActiveX Compatibility{F91CAF91-225B-43A7-BB9E-472F991FC402}]

Just a last reminder: the above instructions only help you out of a quirky situation. You should patch your PC to the latest versions available as soon as you can.

How does ActiveX redirect on my PC?

The following code for Excel/VBA can be used to understand how ActiveX redirection is on set on your PC. Copy it in a module of your document (Thisworkbook is ok) and let it run.

Option Explicit

Sub Main()
Dim strComputer As String
Dim oReg As Object
Dim strKeyPath As String
Dim strCompName As String
Dim arrSubKeys As Variant
Dim subkey As Variant
Dim strAltClsId As String
Dim strValue As String
Dim rownum As Long

Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_LOCAL_MACHINE = &H80000002

Application.Cursor = xlWait

strComputer = "."

Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\" & strComputer & "rootdefault:StdRegProv")

strKeyPath = "SOFTWAREMicrosoftInternet ExplorerActiveX Compatibility"

oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

ActiveSheet.Cells.Clear
ActiveSheet.Range("A1").Value = "CLSID"
ActiveSheet.Range("B1").Value = "Component"
ActiveSheet.Range("C1").Value = "Path"
ActiveSheet.Range("D1").Value = "AlternateCLSID"
ActiveSheet.Range("E1").Value = "Component"
ActiveSheet.Range("F1").Value = "Path"
ActiveSheet.Range("G1").Value = "AlternateCLSID"
ActiveSheet.Range("H1").Value = "Component"
ActiveSheet.Range("I1").Value = "Path"
ActiveSheet.Range("J1").Value = "AlternateCLSID"

rownum = 2

On Error Resume Next

For Each subkey In arrSubKeys
    ' get component name and file
    strCompName = vbNullString
    strValue = vbNullString
    oReg.GetStringValue HKEY_CLASSES_ROOT, "CLSID" & subkey, "", strCompName
    oReg.GetStringValue HKEY_CLASSES_ROOT, "CLSID" & subkey & "InprocServer32", "", strValue
    If (strCompName = "") Then GoTo NextSubKey ' class does not exist

    ActiveSheet.Range("A" & rownum).Value = subkey
    ActiveSheet.Range("B" & rownum).Value = strCompName
    ActiveSheet.Range("C" & rownum).Value = strValue

    ' get alternate CLSID.
    strAltClsId = vbNullString
    oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath & "" & subkey, "AlternateCLSID", strAltClsId
    If (strAltClsId = "") Then GoTo NextValue ' alternate does not exist

    ActiveSheet.Range("D" & rownum).Value = strAltClsId

    ' get component name and file
    strCompName = vbNullString
    oReg.GetStringValue HKEY_CLASSES_ROOT, "CLSID" & strAltClsId, "", strCompName
    oReg.GetStringValue HKEY_CLASSES_ROOT, "CLSID" & strAltClsId & "InprocServer32", "", strValue
    If (strCompName = "") Then GoTo NextValue ' alternate does not exist

    ActiveSheet.Range("E" & rownum).Value = strCompName
    ActiveSheet.Range("F" & rownum).Value = strValue

    ' this one also remapped?
    strValue = vbNullString
    oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath & "" & strAltClsId, "AlternateCLSID", strValue
    If (strValue = "") Then GoTo NextValue ' alternate of alternate does not exist
    ActiveSheet.Range("G" & rownum).Value = strValue

    ' get component name and file
    strAltClsId = strValue
    strCompName = vbNullString
    strValue = vbNullString
    oReg.GetStringValue HKEY_CLASSES_ROOT, "CLSID" & strAltClsId, "", strCompName
    oReg.GetStringValue HKEY_CLASSES_ROOT, "CLSID" & strAltClsId & "InprocServer32", "", strValue
    If (strCompName = "") Then GoTo NextValue ' alternate of alternate does not exist

    ActiveSheet.Range("H" & rownum).Value = strCompName
    ActiveSheet.Range("I" & rownum).Value = strValue

    ' this one also remapped?
    strValue = vbNullString
    oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath & "" & strAltClsId, "AlternateCLSID", strValue
    If (strValue = "") Then GoTo NextValue ' alternate of alternate does not exist
    ActiveSheet.Range("J" & rownum).Value = strValue

NextValue:
    rownum = rownum + 1

NextSubKey:
Next

ActiveSheet.Range("A1").Sort Header:=xlYes, _
                             Key1:=ActiveSheet.Columns("C"), Order1:=xlAscending, _
                             Key2:=ActiveSheet.Columns("B"), Order2:=xlAscending
ActiveSheet.Columns.AutoFit

Application.Cursor = xlDefault
End Sub

Click this link to download an Excel 97-2003 compatible XLS file with the same code. Open and enable macros, press Alt-F8, select ThisWorkbook.Main and click Run.

Hello,

The following pertains to Excel 2010 (Office 2010 SP 1 is installed and Windows is fully up to date). Running Windows 7, 32bit.

When opening Excel, the following error from Microsoft Forms appears: «Could not load some objects because they are not available on this machine.» Originally i thought this error was caused exclusively by two third party add-ons (Dfss Master and
SPC XL by SigmaZone). However the same issue occurs when i enable the Solver add-on or the Euro Currency Tools add-on, both of course are native to Excel. If i disable all those add-ons i mentioned, Excel starts up without any errors, however i need these
add-ins to work.

Here is a list of things i’ve tried so far to resolve this:

Office repair

Uninstall Office and did a fresh install (Office 2010 is the only version installed). I also reinstalled Office 2010 SP1.

Went through add/rem features of Office 2010, on the drop down arrow which is before the Microsoft Office and clicked on Run all from my computer, then rebooted.

Cleared the MS Office cache files at C:Users[UserName]AppDataRoamingMicrosoftForms» and «C:Users[UserName]AppDataLocalMicrosoftForms»

Renamed the Excel toolbar file in case its corrupted

Cleared the XLStart folders:
C:Users[UserName]AppDataRoamingMicrosoftExcelXLSTART
C:Program FilesMicrosoft OfficeOffice14XLStart

Pressed Alt + F11 to go into the Visual Basic Editor. Went to Tools > References and made sure none of the available references listed said «missing»

Went through all the settings in Excel’s Trust Center and opened up all the security settings so nothing was disabled or blocked

made sure Microsoft Visual C++ 2010 Redistributable is installed.

If anyone has any other ideas please let me know. I really appreciate anyone who can share any insight on this!

Понравилась статья? Поделить с друзьями:
  • Could not insert new word
  • Could not get a word in edgeways
  • Could not another word
  • Could i have word with you перевод
  • Could i have a word with you please sorry