ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Option window in macros (https://www.excelbanter.com/excel-programming/356028-option-window-macros.html)

sbmr

Option window in macros
 
Years ago I managed to write a macro in excel that brought up a window with
a yes or no option. I have forgotton how I did that and do not have the said
file anymore.
What is that window called so I can look it up in the help?


GS

Option window in macros
 
Hi sbmr,

I believe what you're looking for is: msgbox.

Regards,
GS

"sbmr" wrote:

Years ago I managed to write a macro in excel that brought up a window with
a yes or no option. I have forgotton how I did that and do not have the said
file anymore.
What is that window called so I can look it up in the help?


Chip Pearson

Option window in macros
 
Try

Dim Res As Long
Res = MsgBox("Are you sure?", vbYesNo, "Title")
If Res = vbYes Then
' user clicked yes
Else
' user clicked no
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"sbmr" wrote in message
...
Years ago I managed to write a macro in excel that brought up
a window with
a yes or no option. I have forgotton how I did that and do not
have the said
file anymore.
What is that window called so I can look it up in the help?




sbmr

Option window in macros
 
Thank you, that was what I was after.

"Chip Pearson" wrote:

Try

Dim Res As Long
Res = MsgBox("Are you sure?", vbYesNo, "Title")
If Res = vbYes Then
' user clicked yes
Else
' user clicked no
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"sbmr" wrote in message
...
Years ago I managed to write a macro in excel that brought up
a window with
a yes or no option. I have forgotton how I did that and do not
have the said
file anymore.
What is that window called so I can look it up in the help?





sbmr

Option window in macros
 
Thanks.

"GS" wrote:

Hi sbmr,

I believe what you're looking for is: msgbox.

Regards,
GS

"sbmr" wrote:

Years ago I managed to write a macro in excel that brought up a window with
a yes or no option. I have forgotton how I did that and do not have the said
file anymore.
What is that window called so I can look it up in the help?



All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com