Intercepting Paste Function

  • Thread starter Thread starter MrAlMackay
  • Start date Start date
M

MrAlMackay

Is it possible to intercept the paste function.

I've got formatting spreadsheet problems when people paste in data from their
own sheets / word.

What I'd like to be able to do is when they paste it actually invokes the Paste
Special function and pastes as values only (therefore my own formatting will be
in place).

Appreciate any help that you can offer.

Many Thanks, Al Mackay ( (e-mail address removed) )
 
Al,
This code returns the state of paste, returns 1 for paste, otherwise it is
0.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
MsgBox Application.CutCopyMode
End Sub

Unfortunately, this is an after-the fact response. What you might try is
If Application.CutCopyMode = 1 then
*code to reformat the cells*
End If
The code could be nothing more than copying the format from cells above
the paste range and pastespecial format.
 
Steve

Thanks for your help on this.

Will try this out.

Many thanks for your time.

Cheers, al.
 
Al,

What about creating a macro that calls for the Special Paste, then attach
the macro to a button. You can then have the button appear and disappear
with the form. You will just have to ask people who use the form to use your
special paste button not the one that they are use to.

Julie
 
Back
Top