Private Sub Workbook_BeforePrint(Cancel As Boolean)
N = Right(Range("I2"), 8) + 1
Range("I2") = "NO:" & Format(N, "00000000")
End Sub
8位数的数字 你取7位 有问题吧?
Private Sub Workbook_BeforePrint(Cancel As Boolean)
N = VALUE(Right(Range("I2"), 8)) + 1
Range("I2") = "NO:" & Format(N, "00000000")
End Sub
第一、你应该取8位,第二、应该把文本型改成数据型