• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Locking specific cells containing Macros

TommyDaGun

New Member
Hi Guys,


I need help to lock specific cells that contain Macros.

I've tried the following:-


Private Sub Worksheet_Change(ByVal Target As Range)

Dim MP_RowNumber, MP_ColNumber, MP_Row As Single

Dim YOURPASSWORD As Variant

YOURPASSWORD = ""

Worksheets("Main Working").Unprotect Password = ""


But with no luck. It comes uo with "Compile Error variant not found" and highlights "Password" and "Private Sub Worksheet_Change(ByVal Target As Range)

". I have time stamps that require protecting once data is entered if that makes sense?

Thanks,

Tom
 
@Tommy


Hi


Firstly Welcome to Chandoo_Org Forums, Glad you are here


not sure about your requirement but try the below link which will give some idea


http://chandoo.org/forums/topic/lock-excel-columns-contains-formulas


if any problem please refer us


Thanks


SP
 
Back
Top