How to build an array?
I have the following lines in my code :
If customer = 118 Then
stock = stock – cartons
ElseIf customer = 119
stock = stock – cartons
ElseIf customer = 120 Then ‘
stock = stock – cartons
ElseIf customer = 121 Then
stock = stock – cartons
ElseIf customer = 123 Then
stock = stock – cartons
Instead of these lines I want to build a simple code covering all the mentioned cusomers.
If I build a line as:
If customer 118 or 119 or 120 or 121 or 123 Then
stock = stock – cartons
I receive an error. I do not know why. Is there some other way of making this code, preferably with an array? I know it is ######ible but I cannot do it.