+ Reply to Thread
Results 1 to 6 of 6

making a password in Excel with VBA

  1. #1
    Registered User
    Join Date
    02-20-2013
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    70

    making a password in Excel with VBA

    Hello fellow members,

    I have a problem with making a password in Excel using VBA.

    Can one of you help me?

    I have enclosed the file.

    The start up file i have disabled because the Excelscreen would be invisible.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Richard Buttrey; 01-13-2019 at 08:05 PM. Reason: missing / on CODE tag

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: making a password in Excel with VBA

    Perhaps you could explain what the code is not doing that you expect it to do. What I see is that you compare the values of two text boxes and then compare the value of one of those text boxes to a string value. If all three match then the worksheet is activated, else exit the application. I don't see a problem in the code.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: making a password in Excel with VBA

    @blake,

    Thanks for adding the code tags, so many don't. You missed the / from the [/CODE] tag which suggests you manually entered the tags. Always use the hash # key to generate the tags.

    I edited your original.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: making a password in Excel with VBA

    Please Login or Register  to view this content.
    For starters I suppose the red text should be txtWachtWoord .
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    02-20-2013
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: making a password in Excel with VBA

    Dank je wel bakerman2 (RC) ik keek er geheel overheen.
    thanks bakerman2 for your correct input again.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: making a password in Excel with VBA

    Graag gedaan.
    You're welcome.

+ 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. [SOLVED] Making Password Protected PDFs using Excel Vba and PDFtk Tool
    By mohit1806 in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 06-14-2021, 04:26 AM
  2. Making a password on the drop down list
    By ambrociano in forum Office 365
    Replies: 0
    Last Post: 12-09-2015, 04:12 AM
  3. Including write protect password while making backup
    By muralidaran in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2014, 03:07 PM
  4. Replies: 4
    Last Post: 02-21-2014, 09:30 AM
  5. Making sheets visible/invisible with password
    By manali7120 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2013, 10:32 AM
  6. [SOLVED] Making Folder Password Protected using Macro???
    By jesika in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2009, 07:41 AM
  7. Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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