PDA

View Full Version : Solved: Enter a cummulative value into a cell



simora
04-20-2010, 06:19 AM
How do you add a worksheet cell value to a textbox value and have that new cummulative value submitted to the worksheet, replacing the current worksheet cell value.

I am trying to enter a cummulative value into a cell in a worksheet using a Excel User form. When the user hits the "Enter Data" button, if there's a value in the cell where the submission should go, then I need to add the current value from TextBox1 to the value that's currently in the cell. The cummulative value now replaces the current worksheet cell value.

How do I format this using VBA.

Thanks

lucas
04-20-2010, 06:22 AM
Sheets("Sheet2").Range("H19").Value = Sheets("Sheet2").Range("H19").Value + Me.TextBox1.Value

simora
04-20-2010, 06:32 AM
Lucas:
Thanks.
Never copy anything from Ms Word into VBA.
Somehow, Word corrupted my Range("H19"). into something else like Range(“H19”).