vbYesNoCancel

Katılım
27 Mart 2006
Mesajlar
44
Yapmış olduğum çalışmada yeni kayıt yaparken "Kaydet" tuşuna basmadan kapat düğmesine bastığımda vbYesNoCancel olayını çalıştırmak istiyorum. fakat beceremedim. basit bir konu olabilir ama forumda aradım bulamadım. yardımcı olur musunuz?
 
Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Sayın oktaykarauzun,

Aşağıdaki kodları kullanın:

Kod:
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Kaydetmek istiyor musunuz?"    ' Define message.
Style = vbYesNoCancel    ' Define buttons.
Title = "K A Y D E T"    ' Define title.
'Help = "DEMO.HLP"    ' Define Help file.
'Ctxt = 1000    ' Define topic
        ' context.
        ' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then    ' User chose Yes.
    Call zKaydet   ' Perform some action.
Else    ' User chose No.
    If Response = vbNo Then
        DoCmd.Close ' Perform some action.
    Else
        Exit Sub
    End If
End If
İyi çalışmalar
 
Üst