月日加四位尾数编号生成 VB方式

<%Private Sub Form_Click()
MsgBox "生成两位后缀"
Cls
For i = 1 To 99
barcod= Format(Right(Year(Date), 2), "00") & Format(Month(Date), "00") & Format(Day(Date), "00") & Format(i, "00")
Next
MsgBox "生成四位后缀"
Cls
For i = 1 To 9999
 barcod=Format(Right(Year(Date), 2), "00") & Format(Month(Date), "00") & Format(Day(Date), "00") & Format(i, "0000")
Next
End Sub %>

需要打印的方式的话将barcod=更改为Print

原文地址:https://www.cnblogs.com/xuelishuyue/p/6439471.html