Consulting

Results 1 to 3 of 3

Thread: Need help implementing UserInterFaceOnly:=True

  1. #1
    VBAX Regular
    Joined
    Feb 2016
    Posts
    6
    Location

    Need help implementing UserInterFaceOnly:=True

    I have a workbook with 3 worksheets. I keep my sheets protected but I don't use a password and cells that are used for data entry are unlocked. I am running into a problem with a couple of new macros that won't run because protection is on and I have read about inserting UserInterFaceOnly=True in the workbook module however I have been unable to get it to work.

    Please give the exact syntax to go in the workbook module to keep protection on with no password and UserInterfaceOnly set to True. This setting to apply to all sheets in the workbook.

    Using excel 2016.


    Thank you.

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    ITs not a setting, it's an argument of the Protect method

    Dim oneSheet as Worksheet
    
    For each oneSheet in ThisWorkbook.Worksheets
        oneSheet.Protect UserInterfaceOnly:=True
    Next oneSheet

  3. #3
    VBAX Regular
    Joined
    Feb 2016
    Posts
    6
    Location
    Thanks again.

Posting Permissions

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