P
pvdalen
Please help! This is incredibly frustrating. 
I have this code:
If IsNull(varGenSN) Then
Response = MsgBox("Generator does not exist. Would you like to add it
now?", vbOKCancel, "Generator Add")
If Response = vbOK Then
GenSpec.SetFocus
Else
varGenSN = ""
GenSN.SetFocus
End If
Else
The issue is I seem somehow to be in a loop? When I step through the code,
with code breaks to ensure I can step through, the first line, the If...Then
line, is executed, then the code goes right back to that line? It seemingly
ignores the code breaks?
Then, if I resume stepping through, it again goes through the first step,
then shows the MsgBox. Then, no matter what answer I give, the code again
blows through the break points and goes back to the first line, and enters a
loop that never gets past accepting the input from the MsgBox before
returning to the first line.
My "Else" line had previously been "Elseif Response = vbCancel Then". When
that was the case, the code would show me what the answer was by way of
highlighting the line of code corresponding to the answer given in the
MsgBox, then going right back to the first line.
Is there something egregioulsy wrong?
Thanks,
Paul
I have this code:
If IsNull(varGenSN) Then
Response = MsgBox("Generator does not exist. Would you like to add it
now?", vbOKCancel, "Generator Add")
If Response = vbOK Then
GenSpec.SetFocus
Else
varGenSN = ""
GenSN.SetFocus
End If
Else
The issue is I seem somehow to be in a loop? When I step through the code,
with code breaks to ensure I can step through, the first line, the If...Then
line, is executed, then the code goes right back to that line? It seemingly
ignores the code breaks?
Then, if I resume stepping through, it again goes through the first step,
then shows the MsgBox. Then, no matter what answer I give, the code again
blows through the break points and goes back to the first line, and enters a
loop that never gets past accepting the input from the MsgBox before
returning to the first line.
My "Else" line had previously been "Elseif Response = vbCancel Then". When
that was the case, the code would show me what the answer was by way of
highlighting the line of code corresponding to the answer given in the
MsgBox, then going right back to the first line.
Is there something egregioulsy wrong?
Thanks,
Paul