- ·上一篇教育:excel表格行乘列之和怎么算
- ·下一篇教育:excel表格星期怎么下拉排序
excel表格销售单编号怎么编
1.excel做个销售单,怎样自动插入单号
自己做个打印按钮Sub myprint()Dim x As StringIf Application.Dialogs(xlDialogPrint).Show = True Then x = Sheet1.Range("A1") x = x + 1 Sheet1.Range("A1") = xEnd IfEnd Sub生成单号就在thisworkbook插入下边的代码就可以了Private Sub Workbook_Open() Dim a As String Sheet1.Range("A1").NumberFormatLocal = "@" If Month(Date) < 10 Then a = Year(Date) & 0 & Month(Date) & Day(Date) & "0001" Else a = Year(Date) & Month(Date) & Day(Date) & "0001" End If If Left(Sheet1.Range("a1"), 8) <> Left(a, 8) Then Sheet1.Range("a1") = a End IfEnd Sub。
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)