+ Reply to Thread
Results 1 to 4 of 4

Assign Password to Button

  1. #1
    Mark
    Guest

    Assign Password to Button

    How do I assign a password to a button in excel?

    Thanks,

    Mark

  2. #2
    Chip Pearson
    Guest

    Re: Assign Password to Button

    It isn't clear what you mean. You can't set up a command button
    such that you need a password to click it.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Mark" <[email protected]> wrote in message
    news:[email protected]...
    > How do I assign a password to a button in excel?
    >
    > Thanks,
    >
    > Mark




  3. #3
    Norman Jones
    Guest

    Re: Assign Password to Button

    Hi Mark,

    Try something like:

    '=============>>
    Private Sub CommandButton1_Click()
    Dim res As Variant
    Const PWORD As String = "ABCD" '<<==== CHANGE

    res = InputBox("Insert password")

    If res <> PWORD Then Exit Sub
    'Your button code
    End Sub
    '<<=============


    ---
    Regards,
    Norman


    "Mark" <[email protected]> wrote in message
    news:[email protected]...
    > How do I assign a password to a button in excel?
    >
    > Thanks,
    >
    > Mark




  4. #4
    Mark
    Guest

    Re: Assign Password to Button

    Chip Pearson wrote:
    >> It isn't clear what you mean. You can't set up a command
    >> button such that you need a password to click it.
    >>


    I have a button driven spreadsheet used on a network. I want to password
    protect the button which is used for uncustomising things when I make
    changes.

    Basically the button runs a variation of the auto close macro without
    actually closing down. When the button is pressed I want excel to ask for a
    password.

    Thanks,

    Mark


+ 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