+ Reply to Thread
Results 1 to 4 of 4

How to create an open workbook password via VBA?

Hybrid View

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    How to create an open workbook password via VBA?

    Hi,

    I want to password-encrypt my workbook with VBA, so that it prompts for a password on next opening. I know it can be done with:

    ActiveWorkbook.SaveAs Filename:="FilePath", Password:="password"
    but I don't want to save the file at this point. Basically I need the following function in code
    http://www.reset-password.net/create...xcel-2007.html

    Any idea?

  2. #2
    Forum Contributor Toonies's Avatar
    Join Date
    07-30-2009
    Location
    Newcastle, UK
    MS-Off Ver
    Excel 2016
    Posts
    511

    Re: How to create an open workbook password via VBA?

    hi have a look at this

    http://technologytraining.psu.edu/node/234


    or this


    http://office.microsoft.com/en-gb/ex...010226798.aspx
    Last edited by Toonies; 03-16-2013 at 03:42 AM.

  3. #3
    Registered User
    Join Date
    09-27-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to create an open workbook password via VBA?

    That doesn't help. I want to do it using a macro.

  4. #4
    Forum Contributor Toonies's Avatar
    Join Date
    07-30-2009
    Location
    Newcastle, UK
    MS-Off Ver
    Excel 2016
    Posts
    511

    Re: How to create an open workbook password via VBA?

    Ok try this, it may help you.

    Username is Toonies

    Password is abcd

    Password2.xlsm

    you can change them as you wish.
    It has an Admin page wich is hidden

    If you need any further help let me know

    Toonies

+ 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