GRASP Python (9)
GRASP Python (9)
Description, "PerformAnalysis"
End Sub
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets.Add
' Clean up
Application.DisplayAlerts = False
ws.Delete
Application.DisplayAlerts = True
SolveDirect = result
Exit Function
SolverError:
' Handle singular matrix or other errors
If Err.Number = 1004 Then ' Matrix is singular
MsgBox "System matrix is singular. Structure may be unstable or
improperly supported.", vbExclamation
Else
MsgBox "Solver error: " & Err.Description, vbCritical
P a g e 57 | 62