Programmatic & Manual Copy & Paste No Longer Working For Format, Just Values

Brass Contributor

I've just discovered that a VBA program I wrote years ago has stopped working when copying and pasting a range of cells, with only the values  being copied, the cell fill and font colors no longer being copied.  Here is the line of code I've successfully used for years that's stopped working.

 

'Copy Columns I-J
wboWBO.Sheets("SheetName").Range("I6:J29").Copy .Range("I6:J29")

 

Previous to last week, this worked without fail, now only copies values, not formatting.  Please advise ASAP and fix.

 

Steve

2 Replies

@Steve1330 

Seems like it could be an issue with the Office clipboard not fully gathering the values. The clipboard can glitch like this every so often. My go-to is to open the clipboard and test copying ranges manually to see how the clipboard takes it in:

Patrick2788_0-1667244011297.png

The green icon is a good sign. When the clipboard gives you the blank white sheet of paper then it's only gathering in values with no formatting.  Clear the clipboard and keep pressing copy until it begins working again.  It's one of those things that comes and goes.

Patrick:

Thanks for your reply. But this is not the solution, as I close and clear Excel before attempting the process every time. And this is something that just started the past week for my client, and I replicated on my PC, after having the program with this process in a complex program work just fine for years without this issue.