View Single Post
 
Old 08-26-2015, 01:32 PM
gebobs gebobs is offline Windows 7 64bit Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

When you paste in Excel, you are not just pasting the values. By default, you are also pasting formulas, formatting, comments, and any data validation of the cell(s) that you copied.

If you only wants to paste one of those and not the others, you use Paste Special. I use it all the time when I want to copy the value of a cell that has a formula to another cell.

Same thing in macros. You need to use a PasteSpecial VBA command and it looks something like this...

Code:
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteValues
Reply With Quote