+ Reply to Thread
Results 1 to 12 of 12

Add password in a button code to complete the action

  1. #1
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Add password in a button code to complete the action

    Hello, i want to make a button to clear specific contents from my book. I find a code and i want little help to add some security on this
    Please Login or Register  to view this content.
    Now here, when i click on button, inform me for complete clearance of the contents ( are you sure for the contents clearance?). After the agreement, i want to ask me for personal password twice and then after clicking ok to completing the clearance.

    Ranges are indicatives.

  2. #2
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Add password in a button code to complete the action

    Hello my friend

    Try this:

    Please Login or Register  to view this content.
    If it solves your problem, please mark the Thread as [SOLVED] and add reputation.

    Give me a feedback

    Thanks :D

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Add password in a button code to complete the action

    Give this a try -

    Please Login or Register  to view this content.
    Cheers!
    Deep Dave

  4. #4
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Add password in a button code to complete the action

    Both options work nicely! But, according to what I asked, closer is the code of Deep Dave. Thanks both of you for the help!
    Can i have in all msgboxs titles and not "Microsoft Excel" ?

  5. #5
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Add password in a button code to complete the action

    Quote Originally Posted by NeedForExcel View Post
    Give this a try -

    Please Login or Register  to view this content.
    When i change the password XXX with alphanumeric and trying to work the button it says Passwords Don't Match. What i'm doing wrong?

  6. #6
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Add password in a button code to complete the action

    @Immortal2014

    Try changing:

    Please Login or Register  to view this content.
    So you will be abble to put any kind of value

    Don't know if it solves your problem anyway

    Don't forget to put it in " "

  7. #7
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Add password in a button code to complete the action

    When i change the password XXX with alphanumeric and trying to work the button it says Passwords Don't Match. What i'm doing wrong?
    It should work, as long as it is between ""

    I tried with this
    Please Login or Register  to view this content.
    and it happily worked..

    If you are still having issues, please attach the file if possible..

    See the file attached, the Password is "D12"
    Attached Files Attached Files
    Last edited by NeedForExcel; 01-20-2016 at 11:14 PM.

  8. #8
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Add password in a button code to complete the action

    I'll try both solutions and if it happened again then I'll upload a sample. Thanks again.

  9. #9
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Add password in a button code to complete the action

    Well, i found what was going wrong with the phrase "Passwords don't match". In my personal password using uppercase, lowercase and numbers, with no results . I try only with uppercase, numbers and special characters and the password is accepted. Why this happened?

    String & Variant works well too.

  10. #10
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Add password in a button code to complete the action

    That is coz I am using the UCase function to change any input to upper case..

    Get rid of it, and It should work as required.

  11. #11
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Add password in a button code to complete the action

    In this situation can I delete the UCase from tho lines of code? Sorry for my questions but I'm not familiar with vba..

  12. #12
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Add password in a button code to complete the action

    Not exactly..

    Try if this works.

    Replace

    Please Login or Register  to view this content.
    With

    Please Login or Register  to view this content.
    Let me know if it works..

+ 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. Excel is waiting for another application to complete an OLE action.
    By Doruli in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2015, 06:03 AM
  2. There isn't enough memory to complete this action.
    By matrix2280 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2015, 12:51 PM
  3. There isn"t enough memory to complete this action
    By Tyso in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2015, 01:31 AM
  4. [SOLVED] Userform button action - clear,copy paste and print crashes. Please help with code
    By intex in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2014, 12:16 PM
  5. Excel is waiting for another application to complete an OLE action
    By TheDude76 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2013, 01:19 PM
  6. Inputbox for password protection, monte carlo simulation complete code
    By karan21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2011, 07:44 PM
  7. If text found in list then complete action
    By CJ944 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2010, 08:38 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