以下是引用大红袍在2015/8/14 9:52:00的发言:
PrepareEdit事件
Select Case e.Col.Name
Case "下达日期","责任人","工作内容","工作期限","工作下达"
If e.Row("工作下达") Then
e.Cancel = true
End If
End Select
这是我的代码,帮忙检查下???
Tables("垂直管理系统").Cols("操作记录").AllowEdit = False
Tables("垂直管理系统").Cols("责任人").Combolist = DataTables("用户管理").GetComboListString("Name")
If _UserName = "02人力资源部" Then
Tables("垂直管理系统").AllowEdit = False
Else If _UserName = "001唐总" Then
Tables("垂直管理系统").Cols("完成情况_按时完成情况").AllowEdit = False
Tables("垂直管理系统").Cols("完成情况_延时完成说明").AllowEdit = False
Tables("垂直管理系统").Cols("工作内容").AllowEdit = False
Tables("垂直管理系统").Cols("下达日期").AllowEdit = False
Tables("垂直管理系统").Cols("完成期限").AllowEdit = False
Tables("垂直管理系统").Cols("工作下达").AllowEdit = False
Tables("垂直管理系统").Cols("责任人").AllowEdit = False
Else If _UserName ="01董事会办公室" Then
Tables("垂直管理系统").Cols("完成情况_按时完成情况").AllowEdit = False
Tables("垂直管理系统").Cols("完成情况_延时完成说明").AllowEdit = False
Tables("垂直管理系统").Cols("总裁评价").AllowEdit = False
Tables("垂直管理系统").Cols("总裁审定").AllowEdit = False
Else
Tables("垂直管理系统").Cols("工作内容").AllowEdit = False
Tables("垂直管理系统").Cols("下达日期").AllowEdit = False
Tables("垂直管理系统").Cols("完成期限").AllowEdit = False
Tables("垂直管理系统").Cols("工作下达").AllowEdit = False
Tables("垂直管理系统").Cols("责任人").AllowEdit = False
Tables("垂直管理系统").Cols("总裁评价").AllowEdit = False
Tables("垂直管理系统").Cols("总裁审定").AllowEdit = False
Tables("垂直管理系统").Cols("备注").AllowEdit = False
End If
If e.Col.Name <> "总裁审定" Then
If e.Row("总裁审定") Then
e.Cancel = True
End If
End If
Select Case e.Col.Name
Case "下达日期","责任人","工作内容","工作期限","工作下达"
If e.Row("工作下达") Then
e.Cancel = True
End If
End Select