+ Reply to Thread
Results 1 to 4 of 4

macro for protection

  1. #1
    ynissel
    Guest

    macro for protection

    I recorded a macro to protect a sheet and then then workbook - and I input a
    password. The recorded macro protects both the sheet and workbook - but
    doesnt use a password. Is there a syntax to use to protect them with a
    password ?
    This is my code for recording the macro.

    Application.CutCopyMode = False
    ActiveWorkbook.Protect Structure:=True, Windows:=False

    Thanks,
    Yosef

  2. #2
    Trevor Shuttleworth
    Guest

    Re: macro for protection

    Yosef

    lookup Protect in the VBA Help

    ActiveSheet.Protect Password:=drowssap

    ActiveWorkbook.Protect Password:=drowssap

    ThisWorkbook.Protect Password:=drowssap

    Regards

    Trevor


    "ynissel" <[email protected]> wrote in message
    news:[email protected]...
    >I recorded a macro to protect a sheet and then then workbook - and I input
    >a
    > password. The recorded macro protects both the sheet and workbook - but
    > doesnt use a password. Is there a syntax to use to protect them with a
    > password ?
    > This is my code for recording the macro.
    >
    > Application.CutCopyMode = False
    > ActiveWorkbook.Protect Structure:=True, Windows:=False
    >
    > Thanks,
    > Yosef




  3. #3
    ynissel
    Guest

    Re: macro for protection

    Im not a programmer so the help was a bit too confusing for me.
    Ill copy in your syntax and see what happens. I assume drowssap is your
    actual password ?
    Thanks
    "Trevor Shuttleworth" wrote:

    > Yosef
    >
    > lookup Protect in the VBA Help
    >
    > ActiveSheet.Protect Password:=drowssap
    >
    > ActiveWorkbook.Protect Password:=drowssap
    >
    > ThisWorkbook.Protect Password:=drowssap
    >
    > Regards
    >
    > Trevor
    >
    >
    > "ynissel" <[email protected]> wrote in message
    > news:[email protected]...
    > >I recorded a macro to protect a sheet and then then workbook - and I input
    > >a
    > > password. The recorded macro protects both the sheet and workbook - but
    > > doesnt use a password. Is there a syntax to use to protect them with a
    > > password ?
    > > This is my code for recording the macro.
    > >
    > > Application.CutCopyMode = False
    > > ActiveWorkbook.Protect Structure:=True, Windows:=False
    > >
    > > Thanks,
    > > Yosef

    >
    >
    >


  4. #4
    Trevor Shuttleworth
    Guest

    Re: macro for protection

    Needs to be in quotes if it is the actual password ... my omission. Unless
    you have a variable called drowssap with your password in it.

    Yes, I'm sure the help on this used to be more simple than it is now.

    Regards

    Trevor


    "ynissel" <[email protected]> wrote in message
    news:[email protected]...
    > Im not a programmer so the help was a bit too confusing for me.
    > Ill copy in your syntax and see what happens. I assume drowssap is your
    > actual password ?
    > Thanks
    > "Trevor Shuttleworth" wrote:
    >
    >> Yosef
    >>
    >> lookup Protect in the VBA Help
    >>
    >> ActiveSheet.Protect Password:=drowssap
    >>
    >> ActiveWorkbook.Protect Password:=drowssap
    >>
    >> ThisWorkbook.Protect Password:=drowssap
    >>
    >> Regards
    >>
    >> Trevor
    >>
    >>
    >> "ynissel" <[email protected]> wrote in message
    >> news:[email protected]...
    >> >I recorded a macro to protect a sheet and then then workbook - and I
    >> >input
    >> >a
    >> > password. The recorded macro protects both the sheet and workbook -
    >> > but
    >> > doesnt use a password. Is there a syntax to use to protect them with a
    >> > password ?
    >> > This is my code for recording the macro.
    >> >
    >> > Application.CutCopyMode = False
    >> > ActiveWorkbook.Protect Structure:=True, Windows:=False
    >> >
    >> > Thanks,
    >> > Yosef

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1