Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Goal Seek - Module?

Status
Not open for further replies.

Usul

Vendor
Jan 9, 2001
1
DE
Hi folks

I'm pretty much a newbie to VBA.
I'm trying to 'program' a module that will help me to automate the Goal Seek function.
This is what I like to to:
I got varying numbers of cells that need to be changed with Goal Seek.
In all of the fields that are calculated the same value has to be entered.
All these cells are in the same coloumn and all the value that have the changing value are also one coloumn.
I would like to use a 'mouse select box' highlighting the top left value and to bottom right value. Then I thought about opening a dialog-box to let the user enter the value that the calculated cells should have.

I could'nt find any help on the microsoft site.
It would be great if you could give me a hand (expecially for the part with the selection with the mouse).

THI
Murat
 
It sounds like u just want to do the same thing as selecting a range of cells with a cursor. Basically all u have to do is:

Range(A1:Q20).Select

that highlights all the cells from A1 to Q20 in a box.

Btw, an easy way to learn VBA is to select the Macro tab and Record a New macro. Then do what u want with the Excel sheet, turn off the macro, and go look at the code it autogenerated. Makes life a lot easier.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top