Consulting

Results 1 to 3 of 3

Thread: Solved: Enter a cummulative value into a cell

  1. #1
    VBAX Mentor
    Joined
    Jan 2008
    Posts
    384
    Location

    Solved: Enter a cummulative value into a cell

    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

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    [VBA]Sheets("Sheet2").Range("H19").Value = Sheets("Sheet2").Range("H19").Value + Me.TextBox1.Value[/VBA]
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Mentor
    Joined
    Jan 2008
    Posts
    384
    Location
    Lucas:
    Thanks.
    Never copy anything from Ms Word into VBA.
    Somehow, Word corrupted my Range("H19"). into something else like Range(“H19”).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •