+ Reply to Thread
Results 1 to 4 of 4

Password Protect Document Using Cell Value

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    Manchester, London
    MS-Off Ver
    Excel 2003
    Posts
    8

    Password Protect Document Using Cell Value

    Good morning.
    I currently use a code that will go through multiple worksheets and save each one as an individual workbook whilst password protecting the document. I want to set part of the password for each workbook as referencing a specific cell value in that workbook, the cell will always be the same (A2) but the value in the cell is different in each sheet. is this possible? if so how?

    for example the password format would be "XXX (Cell A2)" with XXX being the same for each workbook.

    Many thanks in advance.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Password Protect Document Using Cell Value

    Hi, Darth Raven,

    you may like to add a blank in between the number and zthe text:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    07-29-2013
    Location
    Manchester, London
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Password Protect Document Using Cell Value

    Thanks for the prompt response.
    if i just wanted the middle 4 characters of the cell how do i do that?

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Password Protect Document Using Cell Value

    Hi, Darth Raven,

    what if the cell only holds 3 characters? Just kidding.

    Instead of
    Please Login or Register  to view this content.
    adjust the start of characters if needed like
    Please Login or Register  to view this content.
    and alter the code for WriteResPassword accordingly.

    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Password Protect One Cell?
    By zeeshan_mirza in forum Excel General
    Replies: 13
    Last Post: 09-12-2022, 07:10 AM
  2. Macro to Password Protect my excel document PDF Format
    By lauren04 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2013, 03:03 PM
  3. [SOLVED] Password protect as cell value
    By Dibbley247 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-31-2012, 06:54 PM
  4. How to password protect a cell but still be able to sort ?
    By GW Trainer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2005, 06:06 PM
  5. Password protect individual cell
    By JimmyB in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2005, 12:15 PM

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