ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Allows users to only paste in cell A1 (https://www.excelbanter.com/excel-programming/354522-allows-users-only-paste-cell-a1.html)

[email protected]

Allows users to only paste in cell A1
 
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.


Tom Ogilvy

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.





All times are GMT +1. The time now is 12:32 PM.

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