ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   textbox query (https://www.excelbanter.com/excel-discussion-misc-queries/29115-textbox-query.html)

Greg B

textbox query
 
I am using a userform to have data transfered to a sheet. I currently use
the code below to send it to a worksheet but what I would like to have
happen is for it to add the total of the textbox to the total already in the
cell.

R = 3 'or whatever desired row variable
Sheets(2).Cells(R, 5).Value = TextBox4.Text

Any help would be great

Thanks in advance

Greg



Bob Phillips

With Sheets(2).Cells(R, 5)
.Value = .Value + CDbl(TextBox4.Text)
End With

--
HTH

Bob Phillips

"Greg B" wrote in message
...
I am using a userform to have data transfered to a sheet. I currently use
the code below to send it to a worksheet but what I would like to have
happen is for it to add the total of the textbox to the total already in

the
cell.

R = 3 'or whatever desired row variable
Sheets(2).Cells(R, 5).Value = TextBox4.Text

Any help would be great

Thanks in advance

Greg





Greg B

Thank you Bob

Greg
"Bob Phillips" wrote in message
...
With Sheets(2).Cells(R, 5)
.Value = .Value + CDbl(TextBox4.Text)
End With

--
HTH

Bob Phillips

"Greg B" wrote in message
...
I am using a userform to have data transfered to a sheet. I currently

use
the code below to send it to a worksheet but what I would like to have
happen is for it to add the total of the textbox to the total already in

the
cell.

R = 3 'or whatever desired row variable
Sheets(2).Cells(R, 5).Value = TextBox4.Text

Any help would be great

Thanks in advance

Greg








All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com