VBA锁定指定单元格

If rs.RecordCount > 0 Then
                .Range("AF4").Value = pjno
                MsgBox "This project number does exists Please create a new one !", 16
                .Range("A1:AH56").Locked = False
                .Range("F6:M6").Locked = True
                ActiveSheet.Protect Password:="locked"
                Exit Sub
Else
               
                
                .Range("AF4").Value = pjno
            
End If

 

posted @ 2019-05-14 17:41  tec2019  阅读(996)  评论(0编辑  收藏  举报