X
Xavier
Hi,
I have no error, but the macro just doesn't do anything. The solver.xla is
activate and also in vba.
But the thing is, even if I initialize it, it won't do anything. On some
cpu, it work very well. Is there an option I need to activate beside the
solver add in in excel and vba? Here's the code :
Sub macro1()
Dim age As Integer
Worksheets("Calcul - Cotis. fixe").Activate
Application.Run "solver.xla!auto_open"
SolverReset
For i = 1 To 300
age = CInt(Worksheets("Calcul - Cotis. fixe").Cells(i + 5, 3).Value)
If age = 65 Then
SolverOk SetCell:=Worksheets("Calcul - Cotis. fixe").Cells(i + 5,
21), _
ByChange:="$T$1", MaxMinVal:=3, ValueOf:="0.70"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
Exit For
End If
Next i
end sub
I have no error, but the macro just doesn't do anything. The solver.xla is
activate and also in vba.
But the thing is, even if I initialize it, it won't do anything. On some
cpu, it work very well. Is there an option I need to activate beside the
solver add in in excel and vba? Here's the code :
Sub macro1()
Dim age As Integer
Worksheets("Calcul - Cotis. fixe").Activate
Application.Run "solver.xla!auto_open"
SolverReset
For i = 1 To 300
age = CInt(Worksheets("Calcul - Cotis. fixe").Cells(i + 5, 3).Value)
If age = 65 Then
SolverOk SetCell:=Worksheets("Calcul - Cotis. fixe").Cells(i + 5,
21), _
ByChange:="$T$1", MaxMinVal:=3, ValueOf:="0.70"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
Exit For
End If
Next i
end sub