G
Garry
I am very confused!!
I am working on an application that includes public subs in a module. An
example is:
Public Sub CancelCurOrder(NewOrderNo As Long)
When I use the sub in VBA code I have:
CancelCurOrder (NewOrder)
I recently added another public sub to the module:
Public Sub UpdateInventory(ItemNo As String, Delta As Integer)
When I try to use it in the VBA code as:
UpdateInventory(stDocName, iNum)
I get an error in the VBE stating “= expectedâ€
If I use it without the parentheses:
UpdateInventory stDocName, iNum
It works fine.
Can anyone explain what is going on??? When are parentheses required and
when not???
I am working on an application that includes public subs in a module. An
example is:
Public Sub CancelCurOrder(NewOrderNo As Long)
When I use the sub in VBA code I have:
CancelCurOrder (NewOrder)
I recently added another public sub to the module:
Public Sub UpdateInventory(ItemNo As String, Delta As Integer)
When I try to use it in the VBA code as:
UpdateInventory(stDocName, iNum)
I get an error in the VBE stating “= expectedâ€
If I use it without the parentheses:
UpdateInventory stDocName, iNum
It works fine.
Can anyone explain what is going on??? When are parentheses required and
when not???