Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Intercepting Paste Function

Al,
This code returns the state of paste, returns 1 for paste, otherwise it is
0.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste function mike3004 Excel Worksheet Functions 9 May 27th 08 01:28 PM
Copy and Paste function TamIam Excel Worksheet Functions 3 April 14th 08 11:30 PM
Paste all function Clairemont Excel Discussion (Misc queries) 0 November 24th 07 08:35 PM
Paste Special Function Juanda Calhoun Excel Discussion (Misc queries) 1 April 18th 06 02:06 PM
cut,copy paste function TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 December 9th 05 07:21 AM


All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"