Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Intercepting Paste Function
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 ( ) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Intercepting Paste Function
Al,
This code returns the state of paste, returns 1 for paste, otherwise it is 0. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Intercepting Paste Function
Steve
Thanks for your help on this. Will try this out. Many thanks for your time. Cheers, al. "steve" wrote in message ... 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. -- sb "MrAlMackay" wrote in message ... 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 ( ) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Intercepting Paste Function
Al,
You're welcome! Hope you can get it to work... -- sb "Al Mackay" wrote in message om... Steve Thanks for your help on this. Will try this out. Many thanks for your time. Cheers, al. "steve" wrote in message ... 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. -- sb "MrAlMackay" wrote in message ... 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 ( ) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Intercepting Paste Function
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 "steve" wrote in message ... Al, You're welcome! Hope you can get it to work... -- sb "Al Mackay" wrote in message om... Steve Thanks for your help on this. Will try this out. Many thanks for your time. Cheers, al. "steve" wrote in message ... 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. -- sb "MrAlMackay" wrote in message ... 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 ( ) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy and paste function | Excel Worksheet Functions | |||
Copy and Paste function | Excel Worksheet Functions | |||
Paste all function | Excel Discussion (Misc queries) | |||
Paste Special Function | Excel Discussion (Misc queries) | |||
cut,copy paste function | Excel Discussion (Misc queries) |