+ Reply to Thread
Results 1 to 4 of 4

VBA Error when using Auto Protect and Track changes at the same time?

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Excel 2010
    Posts
    3

    VBA Error when using Auto Protect and Track changes at the same time?

    Hello,

    I created a new workbook, selected all the cells, and UNCHECKED the locked option for all of them. Next, I protected the sheet, using as password

    Password

    then, I put this code in the Sheet's module.

    Private Sub Worksheet_Change(ByVal Target As Range)

    ActiveSheet.Unprotect "Password"

    Target.Locked = True

    ActiveSheet.Protect "Password"

    End Sub

    Then, everytime I change a cell, it becomes locked. This works fine, until I share the workbook and start tracking changes. When I do this, the sheet no longer auto locks and gives me error codes. I try to go back into the VBA but it says the project is unviewable, and I have to exit out.

    Can someone provide code that allows for the sheet to autolock cells after data entry while tracking changes? I want to know who inputted the data into the cell, a feature that tracking changes shows, while autolocking the cell so that data cannot be changed.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Error when using Auto Protect and Track changes at the same time?

    Welcome to the forum. Are you sure its the tracking changes that is cause the problems and not the settings of the users you're sharing the workbook with?

    Have you checked what their macro settings are?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    07-26-2013
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: VBA Error when using Auto Protect and Track changes at the same time?

    I'm sure its the tracking changes setting. I am just starting to set up the workbook, so noone else has used it, and its basically only been on my computer.

  4. #4
    Registered User
    Join Date
    07-26-2013
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: VBA Error when using Auto Protect and Track changes at the same time?

    bump!

    Need help on this topic please!

+ 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. [SOLVED] Auto run macros at a given time error
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-20-2013, 10:06 AM
  2. Run time error with auto update VBA code
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2013, 04:35 AM
  3. Excel for Shipping (keeping track of weights, auto-create & auto-print)
    By GuppieXX in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-17-2012, 11:19 AM
  4. Run time error 1004-Auto filter
    By jad70 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-12-2009, 12:45 PM
  5. Protect and Track
    By Sheeny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2007, 04:13 PM

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