Protecting Sheet with VBA Code

  • Hi All ..

    Having a problem with protecting a sheet and then the VB Coding doing a flip.

    I have set so that if a number is entered into Column B .. then it will auto populate the 'NOW' date into column C.

    But when I protect my sheet .. it wont do it.
    I have ticket 'Formate Cells' .. but still doesnt seem to work.

    Any ideas?


    Tayler [the blue fox] :thanx:

  • Re: Protecting Sheet with VBA Code

    Can you post a sample of what you have to get a better understanding of what you are trying to acccomlish?

  • Re: Protecting Sheet with VBA Code

    Here is what is set into the worksheet.
    Now when I protect the sheet .. this doesnt work.
    The DEBUG highlights in yellow the line ..

    .Value = Now

    Can this not be run if you have protected the sheet?

    Tayler [the blue fox] :thanx:

  • Re: Protecting Sheet with VBA Code

    ActiveSheet.Protect Password:="Password", UserInterfaceOnly:=True

    Works just ducky if you enter it towards the end of your code... it also allows for one to duplicate the sheet(s) without losing control over the protection.. I've tried all the rest and they work fine for static workbooks however, in the real world workbooks are more dynamic then that...

    Good Luck


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!