Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TJK TJK is offline
external usenet poster
 
Posts: 1
Default How do I set a goalseek value via an input box using vba macro

code = Range("J22").GoalSeek Goal:=myNum = Application.InputBox("Enter a
number"), ChangingCell:=Range("C5")
The input box will fire up but will not use the input value as the value
in the goalseek calc.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default How do I set a goalseek value via an input box using vba macro

Sub Macro2()
x = Application.InputBox("give me a goal")
Range("C5").GoalSeek Goal:=x, ChangingCell:=Range("A1")
End Sub

--
Gary''s Student - gsnu200739


"TJK" wrote:

code = Range("J22").GoalSeek Goal:=myNum = Application.InputBox("Enter a
number"), ChangingCell:=Range("C5")
The input box will fire up but will not use the input value as the value
in the goalseek calc.

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
Goalseek Excel 2007 Gerry Verschuuren Excel Discussion (Misc queries) 1 February 7th 07 11:12 AM
Macro Data Input rbiggs Excel Discussion (Misc queries) 10 December 10th 06 11:09 PM
GoalSeek in VBA [email protected] Excel Discussion (Misc queries) 1 July 20th 06 05:13 AM
input box within macro Drummy Excel Worksheet Functions 1 June 7th 06 09:38 AM
Goalseek / Solver Target Value msnews.microsoft.com Excel Worksheet Functions 1 December 2nd 05 01:41 PM


All times are GMT +1. The time now is 12:31 AM.

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"