Welcome to the board.

SolverOk SetCell:="$B$6", MaxMinVal:=3, ValueOf:=Range("A1").Value2
Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.