Thread: vbyesno msgbox
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sam Wilson Sam Wilson is offline
external usenet poster
 
Posts: 523
Default vbyesno msgbox

dim x as variant
x = msgbox("Question")

if x = vbyesno...



"matt3542" wrote:

Dear Forum members,

When opening a workbook I would like to use a vbYesNo MsgBox to prompt the
user to answer yes or no to a given question. Depending on whether they
answer yes/no I want another MsgBox to confirm their input. I have tried
using the following but to no avail, can anyone please help? Thanks, Matt

Private Sub Workbook_Open()
MsgBox ("Question")
If MsgBox = vbYes Then
MsgBox ("Reply if yes")
Else
MsgBox ("Reply if no")
End If

End Sub