Home |
Search |
Today's Posts |
#1
|
|||
|
|||
whole rows, not cells
I want to protect a particular sheet so that the user can only select copy
and paste whole rows, not individual cells. Is this possible? |
#2
|
|||
|
|||
whole rows, not cells
Maybe you could give the user a macro that would get the range to be copied,
extend it to the whole row, get the row to paste, unprotect the worksheet, do the copy|Paste and then reprotect the worksheet. Something like: Option Explicit Sub testme() Dim RngToCopy As Range Dim CellToPaste As Range Dim myPWD As String myPWD = "hi" Set RngToCopy = Nothing On Error Resume Next Set RngToCopy = Application.InputBox _ (Prompt:="Select a row to copy", Type:=8).Cells(1).EntireRow On Error GoTo 0 If RngToCopy Is Nothing Then Exit Sub End If Set CellToPaste = Nothing On Error Resume Next Set CellToPaste = Application.InputBox _ (Prompt:="Select a row to paste", Type:=8).Cells(1).EntireRow On Error GoTo 0 If CellToPaste Is Nothing Then Exit Sub End If With RngToCopy .Parent.Unprotect Password:=myPWD On Error Resume Next .Copy _ Destination:=CellToPaste If Err.Number < 0 Then MsgBox "Copy|Paste failed" Err.Clear End If .Parent.Protect Password:=myPWD End With End Sub Mass group box delete wrote: I want to protect a particular sheet so that the user can only select copy and paste whole rows, not individual cells. Is this possible? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
identically size merged cells for sorting rows | Excel Discussion (Misc queries) | |||
Selecting rows from cells | Excel Discussion (Misc queries) | |||
I want to sort selected cells in Excel, not entire rows. | Excel Discussion (Misc queries) | |||
I Need to divide all cells in rows 2 and 3 by 100 | Excel Discussion (Misc queries) | |||
Adding Rows to Master Sheet | New Users to Excel |