Jan 29 2024 11:21 AM
Hi All:
I created a spreadsheet with the following VBA:
Function SumColor(MatchColor As Range, sumRange As Range) As Double
Dim cell As Range
Dim myColor As Long
myColor = MatchColor.Cells(1, 1).Interior.Color
For Each cell In sumRange
If cell.Interior.Color = myColor Then
SumColor = SumColor + cell.Value
End If
Next cell
End Function
It worked great until I closed it and opened another spreadsheet that does not use this code. Then when I reopened the spreadsheet with the VB micro above I get the Catastrophic failure message. Any ideas?
Jan 31 2024 12:42 AM
The error you are encountering, "Microsoft Visual Basic for Applications System Error &H8000FFFF (-2147418133). Catastrophic failure," can sometimes occur due to issues with the VBA environment or conflicts with other applications. Here are some suggestions to troubleshoot and resolve the issue:
If the issue persists after trying these steps, it may be necessary to investigate further or seek assistance from Microsoft Support. Additionally, if the Catastrophic Failure error persists, there might be deeper issues with your Excel installation, and you may need to repair or reinstall Microsoft Office. The text and steps were edited with the help of AI.
The steps provided are generally applicable to various versions of Microsoft Excel, including Excel 2016, 2019, and Excel for Microsoft 365. However, some specific features or menu locations might vary slightly between versions. Remember, these instructions are general, and some details may vary based on your specific Excel version.
If none of these steps help you, I recommend adding more information to your topic. Information such as Excel version, operating system, storage medium, file extension, etc.
In this link you will find some more information about it:
Welcome to your Excel discussion space!
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and Like it!
This will help all forum participants.
Jan 31 2024 02:24 AM
The "Microsoft Visual Basic for Applications System Error &H8000FFFF (-2147418133). Catastrophic failure." error you're encountering can be frustrating, but there are a few reasons it might be happening in your specific case. Here are some things to try:
1. Check for "Workbook_Open" event code:
2. Verify references:
3. Clear compiled code:
4. Debug the code:
5. Consider alternative approaches:
Additional Tips:
Remember, troubleshooting VBA errors can be tricky, but by testing and analyzing different possibilities, you should be able to pinpoint the cause and fix the problem.
I hope this helps!
Feb 08 2024 09:06 AM
Feb 08 2024 10:06 PM
To color code the events based on the year in which they occurred in Excel, you can use conditional formatting. Here's how you can do it:
Adjust the cell references in the formula as per your actual data range.
By following these steps, you can color code the events based on the year in which they occurred in your Excel sheet. You can customize the formatting and the years as per your requirements. This method allows you to visually distinguish events from different years, making it easier for managers to analyze the data.