System Error &H8004111 + out of memory when using Excel macros

  • Thread starter System Error &H8004111
  • Start date
S

System Error &H8004111

I opened an Excel spreadsheet that contains VB macros (MS Office 2003 under
XP SP4) and a popup window appeared with this message "System Error
&&H8004111 (-2147221231), cliked OK, and another popup with "Compile error:
out of memory".
I have the MSCOMCT2.OCX already registered. Please advise if any .OCX or
..DLL could be corrupted.
 
J

JLGWhiz

Usually, when the out of memory message appears and there has been little if
any code executed, there will be a self feeding loop that caches data as it
loops and just eats the memory. Try opening the file while holding the
shift key down. If you do not get the message, then check your ThisWorkbook
code module for an auto open procedure that contains one of those loops.
 
S

System Error &H8004111

Thanks for the advice. Holding down the shift key let me open the workbook,
but I could not save it (with and without holding down the shift key), same
error as described.
I checked ThisWorkbook code, copied below

=====CODE=======
Private Sub Workbook_Open()

'I make sure to have the fourth parameter (UserInterfaseOnly) in True if
protection is active for the BasLine sheet

Application.ScreenUpdating = False

If baseline.Protection.AllowFormattingColumns = True Then
ProtectSheet "Baseline", gc_strPwd
End If

If SheetProtected("Resources") Then
UnProtectSheet "Resources", gc_strPwd
ProtectSheet "Resources", gc_strPwd
End If

Application.ScreenUpdating = True

'Outlining should be enabled in order to Expand and Collapse groups
baseline.EnableOutlining = True
RES_DEF.EnableOutlining = True

'Disable the "CTRL + X" key stroke combination
Application.OnKey "^x", ""

End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)

If Application.CutCopyMode = xlCut Then
MsgBox "Cutting is not allowed in FWBDT"
Application.CutCopyMode = xlCopy
End If

End Sub

=====END CODE=====

I´m not a the programmer, I am the end user for this workbook, so I don´t
understand the code. Please tell me what to tell to the programmers. Thanks
in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top