Results 1 to 2 of 2

Thread: Worksheet Protection Method with UserInterfaceOnly Argument

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Worksheet Protection Method with UserInterfaceOnly Argument

    Code:
    Private Sub Workbook_Open()
        Dim wks As Worksheet
        For Each wks In ThisWorkbook.Worksheets
            wks.Protect userinterfaceonly:=True
        Next wks
    End Sub
    While protecting a sheet through code there is a parameter 'UserInterfaceOnly' which if set to True allows any modification on sheet through code only. However, it doesn't allow any direct change in the sheet e.g. if you cannot write anything on the sheet if it is protected with 'UserInterfaceOnly' parameter set to True.

    Regards: technicalupload

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,122
    Rep Power
    10
    Hi,

    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

Similar Threads

  1. Forcing an Argument to be Passed by Value
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 4
    Last Post: 05-21-2013, 11:28 AM
  2. Print Nth Worksheet To Mth Worksheet using VBA
    By Ryan_Bernal in forum Excel Help
    Replies: 2
    Last Post: 02-28-2013, 06:57 PM
  3. WorksheetFunction.MInverse Method
    By Rasm in forum Excel Help
    Replies: 1
    Last Post: 12-06-2011, 07:55 AM
  4. Class Objects Created Using the CreateObject Method That Employs Late Binding
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 08-16-2011, 12:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •