Pasting values from a textbox into a single cell on a spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top