Results 1 to 7 of 7

Password Protection and Disapling Macros

Threaded View

emilyloz Password Protection and... 06-05-2013, 09:10 AM
ragulduy Re: Password Protection and... 06-05-2013, 09:29 AM
AndyLitch Re: Password Protection and... 06-05-2013, 09:32 AM
emilyloz Re: Password Protection and... 06-05-2013, 09:36 AM
emilyloz Re: Password Protection and... 06-05-2013, 09:34 AM
ragulduy Re: Password Protection and... 06-05-2013, 09:39 AM
emilyloz Re: Password Protection and... 06-05-2013, 09:43 AM
  1. #1
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Password Protection and Disapling Macros

    Hello,

    I'm putting a password on my workbook, and I want to disable certain buttons if the workbook is opened in 'Read Only'

    This is what I have so far in the module,
    Private Sub Workbook_Open()
     
        If ThisWorkbook.ReadOnly Then
         
            Sheets("Home Page").Maintenancebtn.Enabled = False
            Sheets("Home Page").Contractorsbtn.Enabled = False
            Sheets("Current Maintenance").UpdateHistory1.Enabled = False
            Sheets("Current Contractors").UpdateHistory2.Enabled = False
     
        End If
    
    End Sub
    This code came from: http://www.mrexcel.com/forum/excel-q...read-only.html

    But nothing is happening, it's still allowing me to click the buttons.

    I have attached a version of my old work book. If you plan on editing and re attaching, please use the password of '1234'

    Many Thanks
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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