View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Edward Wang Edward Wang is offline
external usenet poster
 
Posts: 18
Default Error of "application-defined or object-defined error" in Goalseek

Hi all,
I always have above error while running below code in the excel 2007,
please help me out!

Sub GoalSeekTry()
Source = Cells(8, 7)
x = Cells(7, 7).Value
ActiveSheet.Range(Source).GoalSeek Goal:=-800,
ChangingCell:=ActiveSheet.Range(x)
End With
End Sub

Source = X*X +X*300

Regards,
Edward