+ Reply to Thread
Results 1 to 3 of 3

Code to make user enter a password in order to hit command button and execute macro

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    21

    Code to make user enter a password in order to hit command button and execute macro

    Hi,

    I am building out a model that will be used by many people. Within the file is a command button used to run a macro that essentially aggregates data inputted on the various tabs into one tab that I use to import into a database. Unfortunately, some people have been hitting this command button when they shouldn't have. I inserted a message box so that if you hit the button, it pops and asks "Are you sure you are Michael and should be running this macro?" Unfortunately, I need to lock this down a little more now as some people insist on continually pressing my buttons (pun intended). Is there any way I can set up a message box that has a password that the user would have to input in order to execute this macro once the command button is pressed?

    Thanks in advance.

    Mike

  2. #2
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Code to make user enter a password in order to hit command button and execute macro

    yes it is possible but can you upload the sample file......



    Regards
    CA Mahaveer Somani

  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,197

    Re: Code to make user enter a password in order to hit command button and execute macro

    Hi, MP3265,

    you would need to use an Inputbox where the password would be visible when typing it in:
    Please Login or Register  to view this content.
    HTH,
    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

+ 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