View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Yandl Steve Yandl is offline
external usenet poster
 
Posts: 284
Default MsgBox, VBYes, VBNo

You can try this for the MsgBox portion.

intResp = MsgBox("Do you qualify for Bank Day?", vbYesNo)
If intResp = 6 Then ' Yes was clicked
Sheets(4).Cells(4, 3).Value = 1
End If
If intResp = 7 Then ' No was clicked
Sheets(4).Cells(4, 3).Value = 0
End If



Steve Yandl



"Richard" wrote in message
...
Help with creationg a MsgBox with VBYes and VBNo, then putting a 1 or 0 in
Sheet4, cell C4. Probably putting the code in Workbook Open?
Example:If date is =July1 and <July 5 then Msgbox "Do you qualify for
Bank
Day? If VBYes is selected then a 1 is sent to Sheet4 cell C4, If VBNo then
a
0 is sent to Sheet4 cell C4. I just can't write the code correctly.
Thanks in advance