+ -
当前位置:首页 → 问答吧 → ★★请老师们给段程序实现这种功能 ★★

★★请老师们给段程序实现这种功能 ★★

时间:2011-08-10

来源:互联网

请老师们给段程序实现这种功能,很棘手的问题,万分感谢,说明在附件中!

附件

请教.rar(6.71 KB)

2011-8-10 20:39, 下载次数: 18

作者: 198311031045   发布时间: 2011-08-10

Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Target.Column = 22 And Target.Value = "审核" Then
        Cells(Target.Row, 1) = "=row()-7"
        Cells(Target.Row, 1) = Cells(Target.Row, 1).Value
        With Sheet2
            .Unprotect
        If .Protection.AllowEditRanges.Count > 0 Then .Protection.AllowEditRanges.Item(1).Delete
            .Protection.AllowEditRanges.Add "不可编辑", Range:=Range("A" & Target.Row + 1 & ":V6000")
            .Protect
        End With
    End If
    Application.EnableEvents = True
End Sub

作者: AVEL   发布时间: 2011-08-10

我也不会,等着高人来。

作者: xj1016   发布时间: 2011-08-10

请自己黏贴覆盖原代码测试。

作者: AVEL   发布时间: 2011-08-10

谢谢这位老师,挺好的,如果我打算加保护密码,怎么加!请指点啊!

作者: 198311031045   发布时间: 2011-08-10

在:
    .Unprotect "123"
    .Protect "123"
两个后面加就好了[密码为123]。

作者: AVEL   发布时间: 2011-08-10

再次谢谢您啊!以后有问题再向您请教,真是解决了我的燃眉之急了。呵呵

作者: 198311031045   发布时间: 2011-08-10

相关阅读 更多

热门下载

更多