+ Reply to Thread
Results 1 to 6 of 6

Adding 'Password upon opening workbook' in VBA coding

  1. #1
    Registered User
    Join Date
    11-23-2010
    Location
    Quebec, Canada
    MS-Off Ver
    Excel 2003
    Posts
    9

    Adding 'Password upon opening workbook' in VBA coding

    Hi, I am looking to modify this VBA code to include a password-protect upon opening the workbook in Excel 2007. The VBA code doesn't seem to function if I add the password-protect in the standard fashion... Any thoughts??
    Please Login or Register  to view this content.
    Thanks! - Reayn
    Last edited by shg; 01-13-2011 at 07:31 PM. Reason: fix closing code tag

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Adding 'Password upon opening workbook' in VBA coding

    EnableOutlining is a worksheet property, not an argument to the Protect method.
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-23-2010
    Location
    Quebec, Canada
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Adding 'Password upon opening workbook' in VBA coding

    Ok, but the code still does not work when a 'password upon opening the workbook' is created.... Help pls - Thanks! Reayn

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Adding 'Password upon opening workbook' in VBA coding

    Open and Modify passwords are different than sheet passwords; you have to provide them when you open the workbook. See Help for the Open method.

  5. #5
    Registered User
    Join Date
    11-23-2010
    Location
    Quebec, Canada
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Adding 'Password upon opening workbook' in VBA coding

    Ok, I am still very new to VBA coding and am not sure how to insert it in the code but I would like to have the password 'eb' used to open the workbook. Can you help me with specific instructions or the modified code? - Reayn

  6. #6
    Forum Contributor TechRetard's Avatar
    Join Date
    06-14-2009
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Adding 'Password upon opening workbook' in VBA coding

    i'm pretty newbish but can't you just say
    Please Login or Register  to view this content.

+ 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