View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Allows users to only paste in cell A1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.DragAndDrop = False
If Intersect(target,Columns(1)) is nothing then
Application.CutcopyMode = False
End if
End Sub

Put this in the Sheet module of the sheet

You would need to enable DragAndDrop in other sheets, perhaps using the
Activate events.

Chip Pearson's page on events
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy




wrote in message
oups.com...
I need someway of allowing users to only paste in cell A1. Now I can't
just create a user editable range and then protect the other cells as
the user will be pasting a table of data exported from an external
programming. I just need the data to only be allowed to be pasted in
cell A1 so I can have a worksheet that links to the data, correctly use
vlookup on it.
How would I make it so that all the data is pasted only starting at
cell A1.

Also I would like to prevent the users from being able to drag a range
of data as well on the worksheet. So when they paste it there should
be no way of moving it around otherwise this may also mess up my
vlookup formulas I have linked to the sheet.