Hi there,
In a peice of VBA code I am a using Copy-Paste with xlValues as follows:
However, when I run this code, not only the values are pasted but also the formatting (borders, background and number formatting) are copied. Shouldn't xlPasteValues limit to values onlye or am I doing something wrong here?
In a peice of VBA code I am a using Copy-Paste with xlValues as follows:
Code:
Dim Sourcebook, Targetbook as Workbook
Dim Sourcesheet, Targetsheet as Worksheet
Dim Sourcerange, Targetrange as Range
........
Sourcebook.Sourcesheet.SourceRange.Copy
Targetbook.Targetsheet.TargetRange.PasteSpecial Paste:=xlPasteValues, SkipBlanks:=True
However, when I run this code, not only the values are pasted but also the formatting (borders, background and number formatting) are copied. Shouldn't xlPasteValues limit to values onlye or am I doing something wrong here?