Hello everyone,
With the right mouse button, would like to copy the locked cells in the area "R4: R18" and paste them into another workbook and worksheet.
Folder and sheet is password protected with VBA, cells are locked and hidden in cell formatting.
How can I do this?
… at the same time want to keep the other options with the right mouse button.
Any help is welcome
Thx in Advance
Nikko
With the right mouse button, would like to copy the locked cells in the area "R4: R18" and paste them into another workbook and worksheet.
Folder and sheet is password protected with VBA, cells are locked and hidden in cell formatting.
How can I do this?
… at the same time want to keep the other options with the right mouse button.
VBA Code:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Excel.Range, Cancel As Boolean)
ActiveWorkbook.Sheets("Menu").Unprotect ("1234")
If Not Intersect(Target, Range("G4:G18")) Is Nothing Then
Target = IIf(Target = "", "A", "")
Cancel = True
End If
If Not Intersect(Target, Range("I4:I18")) Is Nothing Then
Target = IIf(Target = "", "X", "")
Cancel = True
End If
If Not Intersect(Target, Range("B7:B7")) Is Nothing Then
Cancel = True
TimeScale.Show
End If
If Not Intersect(Range("R4:R18"), Target) Is Nothing Then
????????????????????????????????
????????????????????????????????? VBA code ?
????????????????????????????????
End If
ActiveWorkbook.Sheets("Menu").Protect ("1234")
End Sub
Any help is welcome
Thx in Advance
Nikko