I received a spreadsheet from someone and the macros do not run. I am not prompted to enable or disable macros when I open the file. Perhaps this is a function I do not have enabled?
Can anyone see the problem with this spreadsheet?
Thanks…Susan
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Macros not running (Excel 2000)
I am still having problems with this file on Windows 2000 stations. The security is set to medium, references are set correctly and I still get a “compile error, cannot find project or library”. I uninstalled and reinstalled office with all the options. In the references was a “MISSING: Microsoft Windows Common Control2-6” so installed windows 2000 sp3. This still did not resolve the problem.
Does anyone have any ideas?
Microsoft Windows Common Controls-2 6.0 are not part of a standard Office or Windows installation, as far as I know. These controls come with Visual Studio 6 (VB6 etc.), and with Office Developer Edition. So you’re bound to run into trouble on some PC’s, unless you make an installation package that installs these controls (in this case, the file is MSCOMT2.OCX).
You need to register the control on th etarget system. Windows has a utility called Regsvr32 to do just that.
Run the following command :
Regsvr32 /s C:WindowsSystem32MSCOMCT2.OCX
I attach a workbook that will on opening install the control for you provided that a copy of Mscomct2.ocx is included in the same folder as the workbook. It copies the control to the system directory and then registers the control on the target computer..
The code is as follows :
Private Declare Function GetSystemDirectory Lib “kernel32” _
Alias “GetSystemDirectoryA” ( _
ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
Function SysDir()
Dim sSave As String, Ret As Long
sSave = Space(255)
Ret = GetSystemDirectory(sSave, 255)
sSave = Left$(sSave, Ret)
SysDir = sSave
End Function
Private Sub Workbook_Open()
Dim wshShell, oFSO, sf
Dim strInstallFrom As String
strInstallFrom = ThisWorkbook.Path & “”
Set wshShell = CreateObject(“WScript.Shell”)
Set oFSO = CreateObject(“Scripting.FileSystemObject”)
On Error Resume Next
oFSO.CopyFile strInstallFrom & “Mscomct2*”, SysDir
On Error GoTo 0
Shell “Regsvr32 /s ” & SysDir & “Mscomct2.ocx”
Set sf = Nothing
Set wshShell = Nothing
Set oFSO = Nothing
MsgBox “Mscomct2.ocx installed”, vbInformation
End Sub
Andrew C
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications