![]() |
What does "resp" mean?
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.") |
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.") |
What does "resp" mean?
Thanks. I like VBA, and I want to understand as much of it as I can.
"Toppers" wrote: "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.") |
All times are GMT +1. The time now is 08:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com