Hi
I'm using a statement to call other Subs if a unit (or multiple units) in a multi-select list box has been selected (and if not - do nothing). I know that the part below in Bold and Underlined is wrong but I cannot think of what it should be. I've tried a few variations of that part but still it doesn't work. By any chance can you help me with this? Basically i want this for loop to go through the list box (cmbUnit) and for every item selected call one of the two functions in the inner IF statement.
Your help is greatly appreciated. Thanks for your time
I'm using a statement to call other Subs if a unit (or multiple units) in a multi-select list box has been selected (and if not - do nothing). I know that the part below in Bold and Underlined is wrong but I cannot think of what it should be. I've tried a few variations of that part but still it doesn't work. By any chance can you help me with this? Basically i want this for loop to go through the list box (cmbUnit) and for every item selected call one of the two functions in the inner IF statement.
Code:
ElseIf optWho.Value = 2 Then
For j = 0 To (cmbUnit.ListCount - 1)
[B][U]If cmbUnit.Value = True Then [/U][/B]
[B][U]cmbUnit.ListIndex = j [/U][/B]
If optFormat.Value = 1 Then
Call SaveUnitNEWxls(MYnewFolder)
ElseIf optFormat.Value = 2 Then
Call SaveUnitNEW(MYnewFolder)
End If
End If
ProgBarGo.Value = ProgBarGo.Value + 1
Next j
End If
Comment