To be able to get
vbRetry
code, you need to properly set up
MsgBox
, for example:
Sub Test()
Dim ButtonClicked As Long
ButtonClicked = vbRetry
Do While ButtonClicked = vbRetry
ButtonClicked = MsgBox("Click Cancel to exit the loop", vbRetryCancel, "Not found...")
Loop
End Sub
Feel free to change the code to your needs.