+ Reply to Thread
Results 1 to 4 of 4

Protect Column in Worksheet VBA

  1. #1
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2007
    Posts
    11

    Protect Column in Worksheet VBA

    Hello -

    I've been given the task of modifying an existing VBA program and I'm trying to find out if there is a way to protect specific columns of a worksheet in VBA script. I've attempted to use the built-in 'Allow Users to Edit Ranges' permissions within Excel - which works great for my test program, however, when I try to implement it in the 'live' worksheet - a User without permission is still able to edit a given field.

    So, I turned to VBA. Of all the research that I've done, I haven't found a scenario that is similar to what needs to be accomplished.

    Is it even possible to create USER Permissions for only specific columns of a worksheet? (i.e. John can only edit column X - everything else would require a password). If so, this is a little out of my element and I'm not sure where to begin.

    Any guidance is appreciated.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Protect Column in Worksheet VBA

    I don't know why Restricted Ranges wouldn't work for you. Are your "Live fields" locked and the spreadsheet protected?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Protect Column in Worksheet VBA

    They are. I've tried a few times to make sure I didn't miss anything. I'm really at a loss.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Protect Column in Worksheet VBA

    Can you reproduce this problem in a sample workbook and attach it? (Go Advanced>Manage Attachments)
    Here is a simple workbook where anyone can enter into column A but a password is required for Col B.

    Password for B is test1 There is no password on the spreadsheet.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. hide a column in a worksheet and password protect
    By eoreality in forum Excel General
    Replies: 1
    Last Post: 02-07-2006, 10:45 PM
  2. [SOLVED] Passwords Disappear in OpenOffice (Protect Worksheet, and Protect Workbook)
    By msnews.microsoft.com in forum Excel General
    Replies: 6
    Last Post: 12-27-2005, 04:20 AM
  3. Protect a worksheet but allow column resize
    By Phil Jollans in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2005, 09:05 AM
  4. [SOLVED] How to protect a worksheet from being copied to another worksheet
    By SurvivorIT in forum Excel General
    Replies: 3
    Last Post: 08-31-2005, 09:05 AM
  5. Replies: 5
    Last Post: 08-09-2005, 11:05 AM

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