Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i'm trying to create a button that will add values to a cell when the
button is clicked. The cell that is being added to already has a value, however. the user will input their data in a few different places, and hit the button. the code should take the input, perform a few operations, and then add the result to the value of the cell. my problem is adding to a cell that already has value. thanks, donny |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Donny,
Add a CommandButton to the shhet and try something like: '============= Private Sub CommandButton1_Click() Dim srcRng As Range Dim destRng As Range Set srcRng = Me.Range("B1, B3, B5") '<<==== CHANGE Set destRng = Me.Range("A1") '<<==== CHANGE With destRng .Value = .Value + Application.Sum(srcRng) End With End Sub '<<============= --- Regards, Norman "Donny" wrote in message ps.com... i'm trying to create a button that will add values to a cell when the button is clicked. The cell that is being added to already has a value, however. the user will input their data in a few different places, and hit the button. the code should take the input, perform a few operations, and then add the result to the value of the cell. my problem is adding to a cell that already has value. thanks, donny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I add button to cell to easily view all data in cell? | Excel Discussion (Misc queries) | |||
Cell working as a button? Cell color control | Excel Worksheet Functions | |||
Excel - create button to replace cell content with cell value | Excel Worksheet Functions | |||
Control Cell Link for Option Button based on value in a cell | Excel Programming | |||
Control Cell Link for Option Button based on value in a cell | Excel Programming |