Rauber
New Member
- Joined
- Feb 25, 2011
- Messages
- 6
How do I put restrictions for the code in VBA to apply Solver? I wanna know the way that i can link the following Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ActiveSheet.Unprotect
ActiveSheet.Range("y1.").GoalSeek 0#, Range("TK")
ActiveSheet.Range("y2.").GoalSeek 0#, Range("TK")
ActiveSheet.Range("y3.").GoalSeek 0#, Range("TK")
End Sub
I wanna the value 0(zero) for the cell "y1.", but i wanna the same value (zero) for the others ("y2." and "y3.") at the same time, varing the cell "TK".
Thanks a lot!
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ActiveSheet.Unprotect
ActiveSheet.Range("y1.").GoalSeek 0#, Range("TK")
ActiveSheet.Range("y2.").GoalSeek 0#, Range("TK")
ActiveSheet.Range("y3.").GoalSeek 0#, Range("TK")
End Sub
I wanna the value 0(zero) for the cell "y1.", but i wanna the same value (zero) for the others ("y2." and "y3.") at the same time, varing the cell "TK".
Thanks a lot!