Clipboard go empty when unprotecting sheet !!

I

Imbecill

Hello,

My problem is that in my code I unprotect the sheet and furter down the sub,
I try to pastespecial. However, the clipboard go empty when
ActiveSheet.Unprotect come...

I can't "paste first" or in an other way change order, because the
pastespecial is generated by a Application.OnKey "^v", "FormulaPaste"
and the Sheet.Unprotect is inside an event witin another macro that starts
when you activate the sheet.

Any solution? Ive searched everywere ...
 
E

Earl Kiosterud

Imbecill,

CutCopyMode gets turned off my many things when the clipboard contains an
Excel object. To see this, try doing a manual copy, then select a cell,
enter something, and press Enter. Clipboard cleared. When the clipboard
contains other stuff, like text or a graphic, this doesn't happen

You can step through your code with F8, Alt-Tabbing back to Excel to see
where the marching ants around the copied area go away. That's where it
happened. I think you'll have to change your code around and go copy the
stuff just before you want to paste it. The usual construct to do it all at
once is:

Range(MyRange).Copy Destination:=Range("E5")
 
Top