Pankaj Kataria
New Member
- Joined
- Aug 2, 2019
- Messages
- 1
Hi,
I am running the below code:
While in unprotected mode, the code is working fine. The moment protection is applied, it shows an error on the red highlighted text:
The code is to pick the cell value from one sheet and show the corresponding details on another sheet.
Request help.
Regards,
Pankaj
Code is given below:
Sub ViewRecord()
Dim wk_master As Workbook
Dim ws_master As Worksheet
Dim cell_value As String
Set wk_master = ActiveWorkbook
Set ws_master = wk_master.Worksheets(3)
cell_value = ws_master.Cells(ActiveCell.Row(), "B").Value
Range("P1").Value = cell_value
'MsgBox ("The cell value is " & cell_value)
Worksheets("RecordView").Activate
End Sub
I am running the below code:
While in unprotected mode, the code is working fine. The moment protection is applied, it shows an error on the red highlighted text:
The code is to pick the cell value from one sheet and show the corresponding details on another sheet.
Request help.
Regards,
Pankaj
Code is given below:
Sub ViewRecord()
Dim wk_master As Workbook
Dim ws_master As Worksheet
Dim cell_value As String
Set wk_master = ActiveWorkbook
Set ws_master = wk_master.Worksheets(3)
cell_value = ws_master.Cells(ActiveCell.Row(), "B").Value
Range("P1").Value = cell_value
'MsgBox ("The cell value is " & cell_value)
Worksheets("RecordView").Activate
End Sub