Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting values from a textbox into a single cell on a spreadsheet
Hi there,
I am trying to create a macro that searches for a series of identical entries in a spreadsheet and produces the sum of a corresponding range of other variables in the spreadsheet (Corresponding to the initial set of entries). I then want to take this sum value (a Long type variable) and paste it into a cell on the same spreadsheet. I cannot for the life of me get this simple paste to work. As of now the macro finds the value so the bulk of my code works fine, it is just the paste problem that I have. I would greatly appreciate any help. Regards, Jordan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting values from a textbox into a single cell on a spreadsheet
Don't try to copy/paste. Just assign the value to the cell.
Dim MyVar As Long MyVar = some calculations Cells(3,6).Value = MyVar ' or Range("F3").Value = MyVar Mike F "Jordan" wrote in message ... Hi there, I am trying to create a macro that searches for a series of identical entries in a spreadsheet and produces the sum of a corresponding range of other variables in the spreadsheet (Corresponding to the initial set of entries). I then want to take this sum value (a Long type variable) and paste it into a cell on the same spreadsheet. I cannot for the life of me get this simple paste to work. As of now the macro finds the value so the bulk of my code works fine, it is just the paste problem that I have. I would greatly appreciate any help. Regards, Jordan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting values from a textbox into a single cell on a spreadsheet
you will probably get a more accurate reply if you post the applicable
portion of your code. Just copy and paste right into the posting. "Jordan" wrote: Hi there, I am trying to create a macro that searches for a series of identical entries in a spreadsheet and produces the sum of a corresponding range of other variables in the spreadsheet (Corresponding to the initial set of entries). I then want to take this sum value (a Long type variable) and paste it into a cell on the same spreadsheet. I cannot for the life of me get this simple paste to work. As of now the macro finds the value so the bulk of my code works fine, it is just the paste problem that I have. I would greatly appreciate any help. Regards, Jordan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting values from a textbox into a single cell on a spreadsh
Thanks Mike that worked. I am fairly new to VB, but have experience with Java
and Python so I am not completely lost. Thanks again for your help. Jordan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasting multiple cells into a single cell | New Users to Excel | |||
pasting textbox value to active cell | Excel Discussion (Misc queries) | |||
Pasting HTML into a single cell | Excel Discussion (Misc queries) | |||
VBA- inserting multiple cell values into single textbox | Excel Programming | |||
Pasting TextBox values | Excel Programming |