|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
修正了抄写的
Private Sub SpinButton1_Change()
yy
Range("a2") = SpinButton1.Value
End Sub
Function zrq(a As String) As Date
ncrq = DateSerial(Left(a, 4), 1, 1)
zrq = ncrq + 7 * Val(Right(a, 2)) - Weekday(ncrq, 1) - 5
End Function
Sub yy()
Dim xa$, zs, aa, bb
bb = [a1].Value
Sheets("日志").Range("A2") = zrq(bb & "01")
zs = SpinButton1.Value '
xa = bb & Format(zs, "00")
aa = zrq(xa) '
[b3] = aa
For i = 3 To 8
Cells(3, i) = aa + i - 2
Next
End Sub
|
|