+ Reply to Thread
Results 1 to 5 of 5

Prevent Paste into a cell

Hybrid View

  1. #1
    Fred
    Guest

    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. #2
    Dave Peterson
    Guest

    Re: 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. #3
    Fred
    Guest

    Re: 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" <ec35720@netscapeXSPAM.com> wrote in message
    news:42CE7DA8.E0DBF357@netscapeXSPAM.com...
    > 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. #4
    okaizawa
    Guest

    Re: 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. #5
    Fred
    Guest

    Re: Prevent Paste into a cell

    Thanks Okaizawa, that does the job very nicely.

    Fred


    "okaizawa" <okaizawa@hotmail.com> wrote in message
    news:uzCFAXohFHA.708@TK2MSFTNGP09.phx.gbl...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1