bonjour a tous,
J'aimerais assigner un bouton au solveur, pour pouvoir l'executer plus facilement. Pour ce faire j'ai donc enregistrer une macro afin de l'assigner a un bouton. Une fois la macro creee et assignee, visual basic m'adresse un message d'erreur "compil error: sub or fonction not defined"
voici le code de la macro:
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 20/08/2009 by User
'
'
SolverOk SetCell:="$I$21", MaxMinVal:=3, ValueOf:="30", ByChange:="$E$9:$E$18"
SolverAdd CellRef:="$E$9:$E$18", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$9", Relation:=1, FormulaText:="$K$9"
SolverAdd CellRef:="$E$9", Relation:=3, FormulaText:="$J$9"
SolverAdd CellRef:="$E$10", Relation:=1, FormulaText:="$K$10"
SolverAdd CellRef:="$E$10", Relation:=3, FormulaText:="$J$10"
SolverAdd CellRef:="$E$11", Relation:=1, FormulaText:="$K$11"
SolverAdd CellRef:="$E$11", Relation:=3, FormulaText:="$J$11"
SolverAdd CellRef:="$E$12", Relation:=1, FormulaText:="$K$12"
SolverAdd CellRef:="$E$12", Relation:=3, FormulaText:="$J$12"
SolverAdd CellRef:="$E$13", Relation:=1, FormulaText:="$K$13"
SolverAdd CellRef:="$E$13", Relation:=3, FormulaText:="$J$13"
SolverAdd CellRef:="$E$14", Relation:=1, FormulaText:="$K$14"
SolverAdd CellRef:="$E$14", Relation:=3, FormulaText:="$J$14"
SolverAdd CellRef:="$E$15", Relation:=1, FormulaText:="$K$15"
SolverAdd CellRef:="$E$15", Relation:=3, FormulaText:="$J$15"
SolverAdd CellRef:="$E$16", Relation:=1, FormulaText:="$K$16"
SolverAdd CellRef:="$E$16", Relation:=3, FormulaText:="$J$16"
SolverAdd CellRef:="$E$17", Relation:=1, FormulaText:="$K$17"
SolverAdd CellRef:="$E$17", Relation:=3, FormulaText:="$J$17"
SolverAdd CellRef:="$E$18", Relation:=1, FormulaText:="$K$18"
SolverAdd CellRef:="$E$18", Relation:=3, FormulaText:="$J$18"
SolverAdd CellRef:="$I$23", Relation:=1, FormulaText:="$K$23"
SolverAdd CellRef:="$I$23", Relation:=3, FormulaText:="$J$23"
End Sub
Merci a vous !
PS : les accents ne sont pas des oublis, ce pc possede un clavier qwerty.