我有一些东西,将自动为我生产的东西,但我想如果这个单元格是= 0后,运行选择帐户,然后跳过,不生产
Sub AutoMakeInv()
Dim lPrefix As Long
Dim lCount As Long
Dim Account_Number As String
For lPrefix = 1 To 14
For lCount = 1 To 2000
Account_Number = "F" & Format(lPrefix, "00") & " " & Format(lCount, "0000")
Debug.Print Account_Number
Cells(8, 5).Value = Account_Number
Call SelectAcct
Call ProduceInv
' Do something ...
Next lCount
Next lPrefix
End Sub
1条答案
按热度按时间k4emjkb11#
这将检查一个单元格是否为0,如果不为0,则只运行另外两个子程序: