+ Reply to Thread
Results 1 to 5 of 5

Macros in protected sheets

Hybrid View

  1. #1
    Registered User
    Join Date
    05-08-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2013
    Posts
    34

    Macros in protected sheets

    Hello people, I'm new to this so please excuse any simple questions.

    My first question involves having macros work in password protected sheets. I want to have a button linked to a macro which basically unprotects the password protected sheet [without the user seeing it], selects a chart within the sheet to print and the reprotects the password protected sheet using the same passsword [again without the user seeing it].

    The Excel version I'm using is 2007.

    I'm afraid I can't post an example as Excel is on my work PC. And my work PC's browser is years out of date :-)

    One other thing - the workbook in which the sheet is may need to be put into shared user allowing more than one person to update it at any time. This too would be required to be password protected so if anyone suggest a solution for this too I'd be very happy.

    Thanks!!!

    Ed

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Macros in protected sheets

    The macro for unprotecting etc would run like this

    Sub MyMacro()
    ActiveSheet.Unprotect Password:="passme"
    'Your code for chart manipulation here
    'You can record the chart macro and move the code here
    ActiveSheet.Protect Password:="passme"
    End Sub
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    05-08-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Macros in protected sheets

    Hello!!!

    The macro works great - many thanks!!! One thing though, it doesn't work when the spreadsheet is in shared use - any suggestioins???

    Thanks

    Ed

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Macros in protected sheets

    I think all macro's are disabled on shared drives...<-- I'm not too experienced on the subject though.
    Maybe you can ask about that on a different thread ...

  5. #5
    Registered User
    Join Date
    05-08-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Macros in protected sheets

    Will do, thanks for your time.

+ 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