I have checked the code and don't believe it's an issue, because I cannot get the eVMOperNone case to exist. If I set a component to CNI (we use this for "Component Not Installed"), it fires the eVMOperUnplace case. If I replace the part number, it fires the eVMOperReplace case. If I reset to no action, the eVMOperNone does not happen.
A small difference is that I use the integer value of the constants instead of the constant name.
Here is the code:
ForEach vmcompmod In vmcompmods
if vmcompmod.Operation = 0 then
'do nothing
Debug.Print("component " & vmcompmod.Component.Name & " has cmcompmod.operation = 0")
EndIf
if vmcompmod.Operation = 1 then'selects out the unplaced components
unplaced.Add(vmcompmod.Component.Name) 'adds the unplaced components to the unplaced arraylist
EndIf
if vmcompmod.Operation = 2 then'selects out the replaced components
replaced.Add(vmcompmod.Component.Name, vmcompmod.NewPartNumber)
EndIf
Next
The first one, = 0, never happens. And I get no errors when I compile or run.
So I suggest you use the integers, and then verify if it actually ever happens or not. If not, then remove that section of code.
I'm curious to find out what you discover.