|
楼主 |
发表于 2017-9-10 08:55
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 zjdh 于 2017-9-10 08:57 编辑
"录入单据“页的宏改为
Private Sub Worksheet_Activate()
If Mid(Cells(2, 22), 3, 4) * 1 <> Year(Now()) Or Mid(Cells(2, 22), 7, 2) <> Format(Month(Now()), "00") Then
Cells(2, 22) = "WZ" & Year(Now()) & Format(Month(Now()), "00") & "0001"
End If
If Mid(Cells(3, 22), 3, 4) * 1 <> Year(Now()) Or Mid(Cells(2, 22), 7, 2) <> Format(Month(Now()), "00") Then
Cells(3, 22) = "LT" & Year(Now()) & Format(Month(Now()), "00") & "0001"
End If
ScrollArea = "$A$1:$T$23"
End Sub |
|