我无法阻止第二个循环。它只是不断增加。如何在VBA中停止While循环?
While Sheets("Temp BU v2").Cells(1, iColCountTempList) <> ""
If sChooseTemp = Sheets("Temp BU v2").Cells(1, iColCountTempList) Then
MsgBox "WHOOHOO!"
While Sheets("Temp BU v2").Cells(iRow, iColCountTempList) <> ""
If sChooseTempCont = iRow Then
MsgBox "YEAH!"
sFinalMail = Sheets("Temp BU v2").Cells(iRow, iColCountTempList)
Else
iRow = iRow + 1
End If
Wend
Else
iColCountTempList = iColCountTempList + 1
End If
Wend