ねえみんな私は古いおならです、これは私の最初の投稿ですので、親切にしてください。私は、測定機の基本に基づいて独自の言語で作業しています。最初の2つの小切手はテストの目的で失敗するように慎重に設定しました。サイズXの最初のセットはうまく動作します。コードが実行され、Size_Yに到達すると、オペレーターが「私は再測定したくありません」(7を返します)を選択すると、コードは最後の最後までジャンプします。私は間違って自分の椅子を入れ子にしていると思うが、私はそれを見ることができない。ネストされたif文が他のifsにジャンプする
Private Sub CheckSpec
'give operator a message if the measure is out of spec
StartAgain:
If Size_X <= 3.125 OR Size_X >= 3.125 then 'actual spec
'Warn that measure is not in spec and ask for remeasure
BoxPick=Msgbox("Measurement in Zone " & Zone & " for Die Size in X is not in spec. Do you want to measure it again?" , 4 , "Measurment NOT Within Tolerance")
If BoxPick = 6 THEN 'if operator wants to remeasure, measure again and start checks over
Call Measure_Die
GoTo StartAgain
ElseIF BoxPick <> 7 Then 'If value returned is NOT 6 or 7, throw error
OperatorMsg "An error has occured. Contact the tool owner"
Call Unload
ElseIF BoxPick = 7 Then 'If operator chooses not to remeasure then keep going
Else
End If
Elseif Size_Y <= 1.925 OR Size_Y >= 1.925 then
'Warn that measure is not in spec and ask for remeasure
BoxPick=Msgbox("Measurement in Zone " & Zone & " for Die Size in X is not in spec. Do you want to measure it again?" , 4 , "Measurment NOT Within Tolerance")
If BoxPick = 6 THEN 'if operator wants to remeasure, measure again and start checks over
Call Measure_Die
GoTo StartAgain
ElseIF BoxPick <> 7 Then 'If value returned is NOT 6 or 7, throw error
OperatorMsg "An error has occured. Contact the tool owner"
Call Unload
ElseIF BoxPick = 7 Then 'If operator chooses not to remeasure keep going
Else
End If
Elseif Centration_X <= 0.175 OR Centration_X >= 0.225 then
'Warn that measure is not in spec and ask for remeasure
BoxPick=Msgbox("Measurement in Zone " & Zone & " for Die Size in X is not in spec. Do you want to measure it again?" , 4 , "Measurment NOT Within Tolerance")
If BoxPick = 6 THEN 'if operator wants to remeasure, measure again and start checks over
Call Measure_Die
GoTo StartAgain
ElseIF BoxPick <> 7 Then 'If value returned is NOT 6 or 7, throw error
OperatorMsg "An error has occured. Contact the tool owner"
Call Unload
ElseIF BoxPick = 7 Then 'If operator chooses not to remeasure keep going
Else
End If
Elseif Centration_Y <= 0.95 OR Centration_Y >= 1.0 then
'Warn that measure is not in spec and ask for remeasure
BoxPick=Msgbox("Measurement in Zone " & Zone & " for Die Size in X is not in spec. Do you want to measure it again?" , 4 , "Measurment NOT Within Tolerance")
If BoxPick = 6 THEN 'if operator wants to remeasure, measure again and start checks over
Call Measure_Die
GoTo StartAgain
ElseIF BoxPick <> 7 Then 'If value returned is NOT 6 or 7, throw error
OperatorMsg "An error has occured. Contact the tool owner"
Call Unload
ElseIF BoxPick = 7 Then 'If operator chooses not to remeasure keep going
Else
End If
Else
End If
Print #1, Column & "," & Row & "," & Level & "," & Zone & "," & Size_X & "," & Size_Y & "," & Centration_X & "," & Centration_Y & "," & RightNow
End Sub 'CheckSpec
ようこそstackoverflowへようこそ!私はちょっとフォーマットしました。実際に私にはVisual Basicのように見えます... – MPelletier