troubleshooting Question

Excel VBA Query

Avatar of DHPBilcare
DHPBilcareFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft ExcelVB Script
2 Comments2 Solutions237 ViewsLast Modified:
We have a spread sheet in which after a cell has had data entered into it the cell is protected and a password is required to make any further changes.

This is achieved by the following Macro.

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cell As Object
    For Each cell In Target.Cells
            ActiveSheet.Unprotect "qaupdate"
            cell.Locked = True
            ActiveSheet.Protect "qaupdate", DrawingObjects:=True, Contents:=True, Scenarios:=True _
        , AllowFormattingColumns:=True, AllowFormattingRows:=True
    Next cell
End Sub

This locking by cell is proving too restrictive on the normal data user and they have asked if there is a way to lock down by Row.  i.e. as soon as you go to another line the line that was in use locks for normal use, which allows the initial entry to be corrected by the original person if they spot an error in a cell prior to completing the entire line.

Hope this makes sense.  How could this be accomplished?
ASKER CERTIFIED SOLUTION
CvD

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros