Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Prevent Paste into a cell

I am trying to use the Worksheet's Change event but the event is not
triggered when the user pastes data directly into a cell.
Obviously I want the user to be able to modify the cell but I need the
change event so I can update other sheets whenever a change occurs.

Can I prevent a user from pasteing directly into a cell, or can I get the
change event to trigger when data is pasted direct to a cell.

Thanks
Fred


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Prevent Paste into a cell

Pasting into a worksheet causes worksheet_change to fire for me.

What version of excel are you using?

Fred wrote:

I am trying to use the Worksheet's Change event but the event is not
triggered when the user pastes data directly into a cell.
Obviously I want the user to be able to modify the cell but I need the
change event so I can update other sheets whenever a change occurs.

Can I prevent a user from pasteing directly into a cell, or can I get the
change event to trigger when data is pasted direct to a cell.

Thanks
Fred


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Prevent Paste into a cell

Thanks Dave,
I am using excel '97 on windows XP and there is no way I can get the
worksheet's change event nor the workbook's sheetChange event to trigger
when pasting data into a cell.
I am pasting it into the cell without double clicking on the cell first.
Should the change event trigger when pasting?
If so does anyone know of any reasons why mine is not triggering?
When I type data into the cell the event does trigger so the event handler
is working.

Fred

"Dave Peterson" wrote in message
...
Pasting into a worksheet causes worksheet_change to fire for me.

What version of excel are you using?

Fred wrote:

I am trying to use the Worksheet's Change event but the event is not
triggered when the user pastes data directly into a cell.
Obviously I want the user to be able to modify the cell but I need the
change event so I can update other sheets whenever a change occurs.

Can I prevent a user from pasteing directly into a cell, or can I get the
change event to trigger when data is pasted direct to a cell.

Thanks
Fred


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Prevent Paste into a cell

Hi,

this is a way to prevent paste (in excel 2000)

unlock a cell. (e.g. A1) (Format Cell Protection Locked)
lock the next cell. (e.g. B1)
merge the cells. (A1:B1)
hide the locked cell. (B:B)
protect the sheet.

--
HTH

okaizawa

Fred wrote:
Thanks Dave,
I am using excel '97 on windows XP and there is no way I can get the
worksheet's change event nor the workbook's sheetChange event to trigger
when pasting data into a cell.
I am pasting it into the cell without double clicking on the cell first.
Should the change event trigger when pasting?
If so does anyone know of any reasons why mine is not triggering?
When I type data into the cell the event does trigger so the event handler
is working.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Prevent Paste into a cell

Thanks Okaizawa, that does the job very nicely.

Fred


"okaizawa" wrote in message
...
Hi,

this is a way to prevent paste (in excel 2000)

unlock a cell. (e.g. A1) (Format Cell Protection Locked)
lock the next cell. (e.g. B1)
merge the cells. (A1:B1)
hide the locked cell. (B:B)
protect the sheet.

--
HTH

okaizawa

Fred wrote:
Thanks Dave,
I am using excel '97 on windows XP and there is no way I can get the
worksheet's change event nor the workbook's sheetChange event to trigger
when pasting data into a cell.
I am pasting it into the cell without double clicking on the cell first.
Should the change event trigger when pasting?
If so does anyone know of any reasons why mine is not triggering?
When I type data into the cell the event does trigger so the event
handler
is working.





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
Prevent Cut and Paste BadBoy Excel Worksheet Functions 3 February 18th 10 12:12 PM
Prevent paste from re-formatting cell BMac Excel Discussion (Misc queries) 4 January 14th 09 09:42 PM
Prevent cut and paste over a range andy62 Excel Worksheet Functions 0 June 30th 07 04:22 AM
How do I prevent certain Paste options soldier33w Excel Discussion (Misc queries) 1 February 8th 06 02:16 PM
Prevent Paste Simon Shaw[_5_] Excel Programming 2 March 1st 05 03:01 PM


All times are GMT +1. The time now is 09:32 AM.

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

About Us

"It's about Microsoft Excel"