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
|