Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Error of "application-defined or object-defined error" in Goalseek

sorry adjust the code little bit by removing "End With"

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

"Edward Wang" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error of "application-defined or object-defined error" in Goalseek


Your code is unclear to me, but I think you mean:


Code:
--------------------



Sub GoalSeekTry()
Set Source = Cells(8, 7)
Source.GoalSeek Goal:=-800, ChangingCell:=ActiveSheet.Cells(7, 7)
End Sub
--------------------





Edward Wang;723120 Wrote:

sorry adjust the code little bit by removing "End With"

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

"Edward Wang" wrote:

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



--
aflatoon

Regards,
A.
------------------------------------------------------------------------
aflatoon's Profile: http://www.thecodecage.com/forumz/member.php?u=1501
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=202520

http://www.thecodecage.com/forumz

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Error of "application-defined or object-defined error" in Goal

Yes, that is correct!

"aflatoon" wrote:


Your code is unclear to me, but I think you mean:



Code:
--------------------




Sub GoalSeekTry()
Set Source = Cells(8, 7)
Source.GoalSeek Goal:=-800, ChangingCell:=ActiveSheet.Cells(7, 7)
End Sub


--------------------






Edward Wang;723120 Wrote:

sorry adjust the code little bit by removing "End With"

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

"Edward Wang" wrote:

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



--
aflatoon

Regards,
A.
------------------------------------------------------------------------
aflatoon's Profile: http://www.thecodecage.com/forumz/member.php?u=1501
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=202520

http://www.thecodecage.com/forumz

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error 57121 "Application-defined or object-defined error" Shane Devenshire[_2_] Excel Programming 5 August 2nd 09 01:34 PM
1004 "Application-defined or object-defined error" guiu Excel Programming 6 January 12th 06 02:43 PM
What does "Application-defined or object-defined error" mean? Shatin Excel Programming 4 February 3rd 04 10:15 AM
"Application-defined or object-defined error" while printing excel report chemburkar Excel Programming 0 February 2nd 04 08:33 PM
"Run Time Error 1004 Application Defined or Object Defined Error." BJC Excel Programming 4 October 26th 03 03:09 AM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"