月日加四位尾数编号生成 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

posted @ 2017-02-24 17:27  薛李淑月  阅读(317)  评论(0编辑  收藏  举报