+ Reply to Thread
Results 1 to 7 of 7

Password Protect On Open VBA with Range (SaveCopyAs)

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Password Protect On Open VBA with Range (SaveCopyAs)

    How would I re-write the following code to work with an "On open Password" prompt?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Password Protect On Open VBA with Range (SaveCopyAs)

    I mean this alone works perfect:

    Please Login or Register  to view this content.
    But I would need to add a password based on what is in my Sheets("Control").Range("K2")

    I havent' found anything yet online.

  3. #3
    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,198

    Re: Password Protect On Open VBA with Range (SaveCopyAs)

    Hi, Excelnoub,

    if you want to SaveCopyAs there is no chance to do what you want, you would need to use SaveAs for that. You may look up the commands in the VBA Help/Object browser.

    Ciao,
    Holger
    Last edited by HaHoBe; 05-15-2014 at 12:40 PM. Reason: typos - more than I can bear :(
    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
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Password Protect On Open VBA with Range (SaveCopyAs)

    Thank you HAHoBe

  5. #5
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Password Protect On Open VBA with Range (SaveCopyAs)

    I mean, I got the following:

    Please Login or Register  to view this content.
    The thing I don't like is that my Current Workbook is being closed and activate the new one... The SaveCopyAs made it simple as it would just make a copy of that workbook then it would close it while I was still able to work within my "Master Template".

  6. #6
    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,198

    Re: Password Protect On Open VBA with Range (SaveCopyAs)

    Hi, Excelnoub,

    what is saveminusone?

    Please Login or Register  to view this content.
    You will store the fullname of the template, use saveas and return by opening the original workbook before closing the newly created one.

    Ciao,
    Holger

  7. #7
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Password Protect On Open VBA with Range (SaveCopyAs)

    Will try and do this

    saveminusone is:

    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)

Similar Threads

  1. Password protect to open Worksheet???
    By arfanvilla in forum Excel General
    Replies: 10
    Last Post: 02-17-2017, 04:41 AM
  2. Replies: 3
    Last Post: 09-23-2013, 11:49 PM
  3. Password protect range in pivot table
    By claytonk in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-09-2013, 11:22 AM
  4. Password protect a range of cells in Excel 2007
    By Plar1953 in forum Excel General
    Replies: 1
    Last Post: 02-12-2011, 02:06 PM
  5. SaveCopyAs with password support?
    By mariocatch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2007, 03:58 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