I am trying to change the variable cells in OpenSolver with a click of a button. Like with vba to change the OpenSolver model's variable cells.
I tried to use the following:
Sub ChangeVariableCells()
' Clear the existing variable cells
OpenSolver.Reset
' Set new variable cells range
OpenSolver.Range("A1:A10").Variable = True
' Solve the model
OpenSolver.Solve
End Sub
But I get the error:
the macro may not be available in this workbook or all macros may be disabled.
Even though I have enabled macro and "ticked" OpenSolver from the macro settings