CutCopyMode Property


Posted by Josh on December 07, 2001 10:54 AM

I'm trying to write a VBA macro that copies data from CellA on Sheet1 to CellA on Sheet2. copying the data is not the hard part, it's not copying the cell formatting of CellA on Sheet1 that i'm having a problem with. so when i use my macro to copy the data over to Sheet2, it copies the border also. I thought that using

Application.CutCopyMode = False

would prevent the border from being copied over, but i guess i was wrong. MSDN website is no help either since it looks like they need to fix the type-o (see URL)


any other suggestions?

Posted by Tom Urtis on December 07, 2001 11:29 AM

The line Application.CutCopyMode = False clears the clipboard.

Try code that only does a paste special for values, as an example:


Range("YourCopyRange").Copy
Range("YourDestinationRange").PasteSpecial (xlPasteValues)
Application.CutCopyMode = False


Any help?

Tom Urtis



Posted by Josh on December 07, 2001 12:27 PM

thanks, i'll give that a try :) The line Application.CutCopyMode = False clears the clipboard. Try code that only does a paste special for values, as an example: