+ Reply to Thread
Results 1 to 4 of 4

Password Encryption VBA

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Password Encryption VBA

    Hello,
    I am running a program where I have a "Master" Workbook and a "User" Workbook. The Master Workbook is encrypted.
    The "User" Workbook takes its values (via vlookup) from the "Master" Workbook. The problem I get is that if the "Master" Workbook is not open, then if one opens the "User" Workbook the password of the "Master" Workbook is required in order for the Vlookup connections to be updated.
    Is there a way to program a Vba macro in the "User" Workbook to automatically insert the encrypted password each time the Input Dialogue box requests it?

    (I need that as I do not want the users that are using the "User" Workbook to know the password of the "Master" Workbook")

    Thanks
    Dora

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,198

    Re: Password Encryption VBA

    Define somewhere macro with password:

    Please Login or Register  to view this content.
    and then call it at beggining of each code you want:

    Please Login or Register  to view this content.
    Never use Merged Cells in Excel

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 365 on Win11 (365 on Win11 (desktop), 365 on Win11 (notebook)
    Posts
    8,207

    Re: Password Encryption VBA

    Hi, Doruli,

    maybe have a look at the open-command:
    Workbooks.Open(FileName, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)
    You could add the command to the workbook_Open-event in ThisWorkbook. The VBA-Project of that workbook would need to be protected by password.

    I´m not so sure that I may not use another workbook which will hold the data and would be created when clsoing the encrypted workbook.

    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

  4. #4
    Registered User
    Join Date
    10-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Password Encryption VBA

    Thanks
    However, is it a way where the User Workbook is open, the user press the section to update the links that are connected to another data source (i.e. the vlookup command connected to MASTER Workbook) then when the dialog box appears and asks for the password of the MASTER Workbook (in order to update the links) a VBA macro is automatically activated that inserts (without opening the MASTER Workbook) the encrypted password of the MASTER Workbook?

    What I am after, is it any way that a Macro can detect the Opening of an Input Dialogue Box to insert a password and automatically fill the password?

+ 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. Replies: 5
    Last Post: 08-12-2013, 10:34 AM
  2. Excel 2010 VBA password protection / encryption?
    By jmwbowen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-30-2011, 05:06 AM
  3. Excel 2007 : xlsm with encryption (file password)
    By zbaba4 in forum Excel General
    Replies: 0
    Last Post: 07-30-2010, 12:17 AM
  4. [SOLVED] Encryption
    By Lydon Bergin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-13-2006, 08:10 PM
  5. [SOLVED] Password encryption
    By Bill R in forum Excel General
    Replies: 4
    Last Post: 08-19-2005, 12:05 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