PDA

View Full Version : Solved: inputbox not keying value



wilg
01-17-2012, 07:18 PM
Im using the following code for an input box that when the cell is selected the inputbox shows up with the current cell value highlighted to overwrite.

Problem is when I key a new value it does not input into the cell. The same value stays.

Dim str As String
str = InputBox(("Please Key in new Number"), "Title", "$" & ActiveCell.Value)
If StrPtr(str) = 0 Then
End If


Any suggestions where I'm going wrong?

mancubus
01-17-2012, 11:59 PM
str = InputBox("Please Key in new Number", "Title", "$" & ActiveCell.Value)
If StrPtr(str) <> 0 Then ActiveCell.Value = str


why $ sign before Activecell.Value?

wilg
01-20-2012, 08:54 AM
Worked perfect. Thanks for the lesson.

mancubus
01-22-2012, 04:35 PM
you're wellcome...