Thread: Copying Cells
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Copying Cells

I'd use the .value2 property on both sides.

I'm scared enough by having to use .value2 with currence/dates that I'd use it
even if it wasn't required!

And I agree: VBA's help explains that you have to use it--not a very good
explanation of why, though. But that's the way most helps are--just do it,
don't ask why <bg.



Dave Unger wrote:

Hello,

Thanks to all for your replies. Before running into this scenario, I
thought that the Value property of a cell was what was actually stored
in the cell (what you see in the Formula bar), and all that formatting
did was change what was displayed in the cell. Obviously, my
assumption was incorrect, although I'm still not clear as to why.
I'll have to think about this for a while.

Dave, from what you've said, I'm assuming the Value2 property
should always be used when working with Date and Currency formats. Do
you need the Value2 on both sides of the equation? Both of these lines
seemed to produce the same (correct) results in this instance.

Cells(1, 3).Value = Cells(1, 1).Value2
Cells(1, 3).Value2 = Cells(1, 1).Value2

Thanks for your help,

Regards,

DaveU


--

Dave Peterson