Google에서 찾은이 코드가 있습니다. (http://msgroups.net/microsoft.public.excel.misc/locking-cells-automatically-after/45998) 내 작업에이 작업이 필요합니다. -EDIT : 나는 엑셀에서 0 지식을 가지고있다.엑셀 잠금 및 그리드 오류
그리드의 모든 셀은 현재 잠겨 있지 않다. 데이터를 입력 한 후 셀을 자동으로 잠그도록하려면 을 입력하십시오.
최대 "열"열과 행에 대해 무한히 작동하는 코드가 있어야합니다. 이 코드는 Google에서 최대 25x25까지만 가능합니다. 셀이 비어 있거나 비어 있으면 암호 보호가 작동해서는 안되며 이전에 데이터가 있더라도 입력 할 수 있습니다.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRng As Range
Dim myCell As Range
Dim myIntersect As Range
Dim myPassword As String
myPassword = "hi there"
With Me 'the worksheet with the code
'25 rows by 25 columns starting in A1
Set myRng = .Range("a1").Resize(25, 25)
Set myIntersect = Intersect(Target, myRng)
If myIntersect Is Nothing Then
Exit Sub
End If
.Unprotect Password:=myPassword
For Each myCell In myIntersect.Cells
myCell.Locked = True
Next myCell
.Protect Password:=myPassword
End With
End Sub
잠금에만 셀 또는 전체 워크 시트를 고정? – Kasnady
특정 셀에 진입 후 잠금 –
도움을 요청하기 전에 노력하십시오. 오류 발생시 도움을줍니다. 집에서 일하는 것을 돕지 않는다 – Kasnady