View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default What does "resp" mean?

"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

"Elise148" wrote:

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.")