Forum Discussion
heylookitsme
May 11, 2021Iron Contributor
Excel Performance Issues and Errors when PC Usage is high
I have been using Excel for over 25+ years and consider myself an expert. Excel cannot handle complex formulas and big data. Even without volatile formulas Excel can't handle much of anything you thr...
heylookitsme
May 13, 2021Iron Contributor
I hated to post this the other day but the frustration builds over time. I also meant to bring up the fact that workbooks I have created that contain Macros have started popping up this error Can't Find Project or Library. Well, then you can't save it even if you try and repair it. It is due to the Visual Basic Application library Reference. The only way I have found to fix the issue albeit temporarily is to close it out, then open it again in Excel's Safe Mode. I just simply save it, close it out and re-open it as I normally would and it works again for a few weeks to a couple of days before doing it again. Believe me for my peers it is a great confidence booster in my abilities when a program I created fails like this. Ring, Ring, "Hey man that file has another error again something about Missing Project or Library and I just did 2 hours worth of work that has to be re-done". Not my fault, Microsoft's but I'll take a look at it. Before anyone says go into reference and look for the missing one and click it. No that won't work in this situation. For one, VBA will no longer show any code or let you select the reference button. This is a known issue with MS for sometime that has never been fixed. I have Microsoft Enterprise 365 the latest version. I make sure it is updated every Monday Morning. Anyone know a permanent fix for this?
Yea_So
May 13, 2021Bronze Contributor
is your code modular? See example below and maybe create error handling routine/subroutine/sub procedure
https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/program-structure/main-procedure
Module mainModule
Function Main() As Integer
MsgBox("The Main procedure is starting the application.")
Dim returnValue As Integer = 0
' Insert call to appropriate starting place in your code.
' On return, assign appropriate value to returnValue.
' 0 usually means successful completion.
MsgBox("The application is terminating with error level " &
CStr(returnValue) & ".")
Return returnValue
End Function
End Module
OtherFunction(
Other Function Statements or Expressions...
)
Other Sub(
Other Sub Lines...
Exit Sub
)
- heylookitsmeMay 14, 2021Iron ContributorThe Main Procedure is only required for Console Applications that run on their own. While this workbook contains a Workbook_Open Event it wouldn't qualify based on that. Great idea though.