ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent Paste into a cell (https://www.excelbanter.com/excel-programming/333949-prevent-paste-into-cell.html)

fred

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



Dave Peterson[_5_]

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

fred

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




okaizawa

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.


Fred[_22_]

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.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com