pastespecial
thank-you very much
"Tom Ogilvy" wrote in message
...
The code that unprotects the sheet causes the clipboard to be cleared for
me. It copied fine, but I couldn't paste even once (xl2000 - recognize
you
are using xl2002). If I commented out the protect/unprotect code, it
worked
repeatedly for me.
If I ran it like this:
Sub CopyHours()
ActiveCell.Copy
End Sub
Sub PasteHours()
Selection.PasteSpecial Paste:=xlPasteValues
End Sub
Sub setprotect()
ActiveSheet.Protect UserInterfaceOnly:=True
End Sub
It worked fine. I protect the sheet with the UserInterfaceOnly:=true
setting
and I didn't need to unprotect in the Pastehours macro - so the clipboard
didn't get cleared. You would need to set this each time the workbook is
opened.
Regards,
Tom Ogilvy
"billQ" wrote in message
...
and no I am not pasting into part of the copied range
"Tom Ogilvy" wrote in message
...
Are you pasting into part of the copied range or otherwise altering
it.
This will clear the clipboard. If I don't alter the source range, I
can
paste special multiple times.
Regards,
Tom Ogilvy
"billQ" wrote in message
...
Hello,
I am pasting data to cells using
Selection.PasteSpecial
Using this I can only paste to another cell once. Using the
clipboard
viewer, I noticed that after the first paste the clipboard is
cleared,
preventing additional pastes.
Any help will be appreciated.
thanks
bill q
|