Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Catching VbMsgBoxResult


Hi All,

How could i catch the result of a MsgBox and derive actions from th
user decision? Any help welcome!.

Thanks in advance

jose luis

P.D. Here is what i though will do the trick. I was wrong.


GuardarAntes()
MsgBox "Save Changes?", vbYesNoCancel, "Save?"

If VbMsgBoxResult.vbYes = 6 Then
MsgBox "Yes"
End If
If VbMsgBoxResult.vbNo = 7 Then
MsgBox "No"
End If
End Su

--
jose lui
-----------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...fo&userid=1331
View this thread: http://www.excelforum.com/showthread.php?threadid=27394

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Catching VbMsgBoxResult

Public Sub catchResponse()
Dim iResponse As Integer

iResponse = MsgBox("Please Respond", vbYesNo, "My Response")

MsgBox "My Resonse Is: " & iResponse, vbInformation, "Resonse"

End Sub



"jose luis" wrote in message
...

Hi All,

How could i catch the result of a MsgBox and derive actions from the
user decision? Any help welcome!.

Thanks in advance

jose luis

P.D. Here is what i though will do the trick. I was wrong.


GuardarAntes()
MsgBox "Save Changes?", vbYesNoCancel, "Save?"

If VbMsgBoxResult.vbYes = 6 Then
MsgBox "Yes"
End If
If VbMsgBoxResult.vbNo = 7 Then
MsgBox "No"
End If
End Sub


--
jose luis
------------------------------------------------------------------------
jose luis's Profile:
http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=273940



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Catching VbMsgBoxResult

Jose
Try this

Sub doit()
Dim Response
Response = MsgBox("Save Changes", vbYesNoCancel, "Save")
If Response = vbYes Then
MsgBox "Yes"
Else
MsgBox "no"
End If
End Sub

Neil

"jose luis" wrote in message
...

Hi All,

How could i catch the result of a MsgBox and derive actions from the
user decision? Any help welcome!.

Thanks in advance

jose luis

P.D. Here is what i though will do the trick. I was wrong.


GuardarAntes()
MsgBox "Save Changes?", vbYesNoCancel, "Save?"

If VbMsgBoxResult.vbYes = 6 Then
MsgBox "Yes"
End If
If VbMsgBoxResult.vbNo = 7 Then
MsgBox "No"
End If
End Sub


--
jose luis
------------------------------------------------------------------------
jose luis's Profile:
http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=273940



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MACRO: Catching only filled cell data sumit Excel Discussion (Misc queries) 1 November 24th 06 12:28 PM
CATCHING DUPLICATE INFORMATION IN DIFFERENT CELLS SAME PROGRAM Lisa Setting up and Configuration of Excel 1 July 20th 06 05:21 PM
Catching NewSheet-Event in another WorkBook Christoph Basedau Excel Programming 3 October 8th 04 12:01 PM
Catching an error Shannon Excel Programming 1 December 8th 03 08:22 PM
[how to] VBA catching close/print in printpreview Héctor Miguel Excel Programming 0 August 16th 03 02:28 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"