#1   Report Post  
Greg B
 
Posts: n/a
Default Textbox question?

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.

How do I do that?

Thanks

Greg


  #2   Report Post  
Greg B
 
Posts: n/a
Default

Here is the code

R = 3 'or whatever desired row variable
Sheets(2).Cells(R, 5).Value = TextBox4.Text
"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.

How do I do that?

Thanks

Greg




  #3   Report Post  
Peter Jausovec
 
Posts: n/a
Default

Hi,

You can do it like this:

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

--
http://blog.jausovec.net


"Greg B" je napisal:

Here is the code

R = 3 'or whatever desired row variable
Sheets(2).Cells(R, 5).Value = TextBox4.Text
"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.

How do I do that?

Thanks

Greg





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract Data From Textbox SEA Excel Worksheet Functions 6 February 5th 09 08:21 PM
Rich Textbox M.Siler Excel Discussion (Misc queries) 8 May 5th 05 07:25 PM
manipulating textbox in chart Peter Hafner Charts and Charting in Excel 0 January 31st 05 10:55 AM
An easy macro question and one I believe to be a little more diffi TroutKing Excel Worksheet Functions 3 January 18th 05 09:17 PM
Help needed with textbox formatting in Excel 2000 JIMBROOKS Excel Discussion (Misc queries) 1 January 1st 05 03:33 PM


All times are GMT +1. The time now is 06:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"