What does "resp" mean?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In the section of a macro below, what does "resp" mean?

resp = MsgBox("Do you want to run the macro?", vbYesNo, Confirm)
If resp = vbNo Then
MsgBox ("Macro stopped.")
 
"Resp" is just a variable which holds the value of the YES/NO button(s) when
they are pressed. (I suspect "resp" is used as a shorthand for response)

It could equally well have been called "X" or "Y" or "answer".

VbNo is the (special) VBA variable which holds the value associated with the
NO button: vbYES is the equivlent for the YES button.

HTH
 
Back
Top