执行下列 程序后:
For Each dt As Table In Tables
dt.Visible = False
dt.AllowEdit = False
Next
Tables("工资计算").SetColVisibleWidth("员工姓名|80|扣款|60|补助|60|加项|60|缺勤扣社保A|90|扣借款|60|差补|60|安装售后工资|90|安装天数|80|工资日期|100|当月日历天数|100|伙食|60|社保|60|" )
Select Case User.Name
Case "综合副总经理"
Tables("工资计算").Visible = True
Tables("工资计算").AllowEdit = True
Tables("工资计算").Cols.Remove("差补")
Tables("工资计算").Cols.Remove("安装售后工资")
Tables("工资计算").Cols.Remove("安装天数")
Tables("工资计算").Cols.Remove("市内安装天数")
Case "财务部核算"
Tables("工资计算").Visible = True
Tables("工资计算").AllowEdit = True
Tables("工资计算").Cols.Remove("补助")
Tables("工资计算").Cols.Remove("加项")
Tables("工资计算").Cols.Remove("公司奖罚")
Tables("工资计算").Cols.Remove("缺勤扣社保A")
Tables("工资计算").Cols.Remove("伙食")
Tables("工资计算").Cols.Remove("社保")
End Select
在 Case "综合副总经理" 的工资计算 tables 中 扣借款列不显示 ,如果加上
Tables("工资计算").Cols("扣借款").Visible = True
提示 工资计算不存在 扣借款列
在 Case "财务部核算" 中能够显示扣借款列