Hi,
I am trying to protect the sheet while also trying to have few cells editable for the user to enter data.
Rng = 1
DestSht = "Summary"
The below piece of code appears in a loop. The cells that are editable by the user depends on the cell index numbers.
Range(Selection, ActiveCell.Offset(0, Col - 2 - cc - 1)).Select
MyAddress = ActiveWindow.RangeSelection.Address(False, False)
RngNm = "Range" & Rng
Sheets(DestSht).Protect("pass-1")
set c = Application.Sheets(DestSht).Protection.AllowEditRanges.Add(RngNm, Range(MyAddress), "pass-1")
But the above line returns a "Application-defined or Object-defined error"
Can anyojne pls help?
Thanks
Anusha
<!-- / message -->
I am trying to protect the sheet while also trying to have few cells editable for the user to enter data.
Rng = 1
DestSht = "Summary"
The below piece of code appears in a loop. The cells that are editable by the user depends on the cell index numbers.
Range(Selection, ActiveCell.Offset(0, Col - 2 - cc - 1)).Select
MyAddress = ActiveWindow.RangeSelection.Address(False, False)
RngNm = "Range" & Rng
Sheets(DestSht).Protect("pass-1")
set c = Application.Sheets(DestSht).Protection.AllowEditRanges.Add(RngNm, Range(MyAddress), "pass-1")
But the above line returns a "Application-defined or Object-defined error"
Can anyojne pls help?
Thanks
Anusha
<!-- / message -->