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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a cell and changing the number.

Status
Not open for further replies.

gjsala

Technical User
Feb 20, 2003
107
US
I'm trying to write a part of a program that will allow the users to select a cell on a spreadsheet and in the process change the number in the cell that has been selected with their own input. Here is the following code:
CODE.....
ans = Application.InputBox("Type in the cell you wish to_ change.", Cell)
ActiveCell = ans
inp = InputBox("Type in the new number.", Cell)
inp = ActiveCell
CODE...
The cells ranges differ as each sheet is created.
If you have any questions, please let me know. Thanks in advance!
 
VBAjedi,

My question is when I execute this code (above) it doesn't change the cell I want to change on the spreadsheet, even though I input the number into the "input box". Is there something I'm missing?

Thanks.
 
Code:
ans = Application.InputBox("Type in the cell you wish to_  change.", Cell)
inp = InputBox("Type in the new number.", Cell)
range(ans).value = inp
I gave this to you in another thread!

Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top