bikhnoussa
Messages postés1Date d'inscriptionmercredi 20 septembre 2006StatutMembreDernière intervention 2 mars 2010
-
2 mars 2010 à 21:44
cs_Jack
Messages postés14007Date d'inscriptionsamedi 29 décembre 2001StatutModérateurDernière intervention28 août 2015
-
2 mars 2010 à 23:34
j'ai un problem lors de l'excution du macro ,le code aasocié en vba affiche une erreur de compilation "sub ou function non defini",le code est le suivant:
Sub macro3()
' Macro3 Macro
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$D$11", Relation:=1, FormulaText:="1"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$D$11", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$D$17", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$D$20", Relation:=1, FormulaText:="1"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$D$8", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$D$20", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$E$11", Relation:=1, FormulaText:="1"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$E$11", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$E$17", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$E$20", Relation:=1, FormulaText:="1"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$E$20", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$E$8", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$J$11", Relation:=1, FormulaText:="1"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$J$11", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$J$8", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$K$11", Relation:=1, FormulaText:="1"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$K$11", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverDelete CellRef:="$K$8", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverAdd CellRef:="$D$8", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$8", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$D$11", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$D$11", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$11", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$E$11", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$J$8", Relation:=3, FormulaText:="0"""
SolverAdd CellRef:="$K$8", Relation:=3, FormulaText:="0"""
SolverAdd CellRef:="$J$11", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$J$11", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$K$11", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$K$11", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$D$17", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$17", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$D$20", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$D$20", Relation:=1, FormulaText:="0"
SolverAdd CellRef:="$E$20", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$E$20", Relation:=3, FormulaText:="0"
SolverOk SetCell:="$F$57", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$8:$E$8,$D$11:$E$11,$J$8:$K$8,$J$11:$K$11,$D$17:$E$17,$D$20:$E$20"
SolverSolve
End Sub
la premiere ligne est marqué par le jaune et la troisieme par le bleu.
je travail avec l'office 2007,j'ai bien cherché la cause de l'eereur,ils m'ont dit qu'il faut ajouter des reférences"solver.xls"mais je la trouve pas.si quelqu'un peut m'aider ?!