Turning off Cut and Copy?

  • Thread starter Warren McGoldrick
  • Start date
W

Warren McGoldrick

Hi,

I have a range in a worksheet that I do not want users to cut or copy in
when they are in that sheet. The working cells in this worksheet are linked
to another worksheet and it changes their formulas when cut/copy is used.

There is still a need to edit this page as it is basically a list of teams
and names. Team members change from one team to another from time to time.
The preference is that the team members name is deleted and re-typed not cut
or copied and placed in the new team.

I'm not sure where to start but I thought OnAction or somehow when the mouse
moves over the working range that it prevents cut or copy from being used in
that worksheet. I have told users not to use cut or copy, but they forget.
It's a simple workbook that helps me with my rosters.

If you can assist in any way it would be greatly appreciated.

Regards,

Wazza McG
 
J

Jase

Don't know if this helps but have you though of protecting
the sheet and locking the cells that you don't want people
to change?
 
W

Wazza McG

Yes I have, however, this is not suitable as they have to edit the cell in
the range to change the names of the team members. Once the cell is
unprotected they would be able to cut and copy. Thanks anyway.

Wazza McG
 
T

TBee

You could try emptying the clipboard when someone moves between cells,
put this in the worksheet module(s):

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Set CB = New DataObject
CB.SetText Empty
CB.PutInClipboard
End Sub
 
W

Wazza McG

I found another way after much persistence!

I put this in AutoOpen()

Application.CommandBars("cell").Enabled = False
CommandBars("Edit").Enabled = False

and put this in AutoClose()

Application.CommandBars("cell").Enabled = True
CommandBars("Edit").Enabled = True


I could of targeted a worksheet as well. Gee, it's good to have a win
every now and then.

Regards,

Wazza McG
No email replies please - reply to the newsgroup!
 
V

Vasant Nanavati

Of course, this does nothing to disable <Ctrl X> and <Ctrl V>, which is how
I usually cut and paste, or to disable the related toolbar buttons!
 
P

Peo Sjoblom

Also one could wonder why the OP couldn't lock the formula cells and use a
couple of unlocked cells for input linked to the formula cells
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top