+ Reply to Thread
Results 1 to 4 of 4

How to disable/restrict the Macro Button?

Hybrid View

  1. #1
    Registered User
    Join Date
    08-07-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    22

    How to disable/restrict the Macro Button?

    Hi Everyone,

    I have spreedsheet and i want to restict the use of Macro button that i created (lock/unlock) to prevent the other cells to be edited as a requirements. (Excel 2010). Is there a way to restrict the Macro button using macro codes?

    Sample.PNG

    Thanks.
    Last edited by Kooper; 07-20-2012 at 03:37 PM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,275

    Re: How to disable/restrict the Macro Button?

    Simple, but somewhat effective...
    Sub restrictedMacro()
        Const PWord As String = "123abc"
        Dim sPW As String
        
        sPW = InputBox("Enter Password to Continue", "Restricted Action")
        If sPW <> PWord Then Exit Sub
        'Macro follows...
        
        
        
        
    End Sub

  3. #3
    Registered User
    Join Date
    08-07-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: How to disable/restrict the Macro Button?

    Hi dangelor,

    This is Great!



    Thank you.

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,275

    Re: How to disable/restrict the Macro Button?

    Glad to help!

+ 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