Sub abcde()
a = InputBox("请输入考勤月份:", "请输入考勤月份:")
d = a & "月份"
fin = 0
Dim ex As Worksheet
For Each ex In Worksheets
If ex.Name = d Then
fin = 1
End If
Next
If fin = 0 Then
MsgBox "输入错误,该月考勤表不存在!"
Exit Sub
End If
b = InputBox("请输入考勤日期:", "请输入考勤日期:")
b = val(b)
f = Day(DateSerial(2011, 4 + 1, 0))
Dim yn As Double
yn = 0
If 0 "" Then
va = 1
Exit For
End If
Next
If va = 1 Then
aa = MsgBox("该日期巳考勤,你确认要进行修改吗", 4)
End If
If aa = 7 Then
Exit Sub
End If
If aa = 6 Then
MsgBox "确认修改!"
End If
Sheets(d).Select
For k = 4 To rs
Sheets(d).Cells(k, 1).Value = k - 3
Next
Dim mm As String
Dim mn As String
For h = 4 To rs
mm = Sheets(d).Cells(h, 2).Value
If h rs Then
MsgBox "请正确选择考勤对象!"
Exit Sub
End If
cc = ce.Column
If cc 2 Then
MsgBox "请正确选择考勤对象!"
Exit Sub
End If
v = Cells(menrow, b + 2).Value
Cells(menrow, b + 2).Value = mv + v
Next
zz = Day(DateSerial(Year(Date), Month(Date) + 1, 0))
For e = 4 To rs
g = 0
For r = 3 To zz + 2
g = g + Cells(e, r).Value
Next
Cells(e, zz + 3).Value = g
Next
以下己超过字数限制,略去