Hey there,
I am writing a structural analysis code and I need to be able to do some basic matrix manipulations. I put something together to try and accomplish this using the MInverse function but for some reason I continue to get "Run-time error 1004, Application-defined or Object-defined error", I believe that my spelling is correct, and it seems as though nothing is being stored on the variable "dof_number", the error occurs first on line 12:
here is a copy of the code segment:
Sub Matrix_Inverse()
Sheets("Input").Activate
dof_number = Worksheets("Input").Range("DOF_NUMBER1").Value
Sheets("Inverse").Activate
Worksheets("inverse").Cells.Clear
Sheets("Structure").Activate
Worksheets("Structure").Range(Cells(3, 3), Cells(dof_number + 2, dof_number + 2)).Name = "stiff_matrix"
Sheets("Inverse").Activate
Worksheets("Inverse").Range(Cells(4, 2), Cells(dof_number + 3, dof_number + 1)).Select
Selection.FormulaArray = "=minverse(stiff_matrix)"
End Sub
.
no clue what's going on. I would love to figure this one out.
Excel inputs 5043.xlsm
Bookmarks