I was looking for VBA code so that whenever I copy and paste the text into Excel from wherever the formatting will be preserved. To do it, I discovered two distinct codes:
Sub PasteWithDestinationFormatting()
ActiveCell.PasteSpecial (xlPasteAll)
End Sub
and
Sub PasteWithDestinationFormatting()
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, DisplayAsIcon:=False
End Sub
The issue is that while both of them function, they both make it impossible to use the "Undo" button and the "Ctrl + Z" shortcut. I'm attempting to determine the cause of this and what I can do to remedy it.