SORU ve CEVAPLAR (Yazılabilir) > Microsoft Outlook Soru ve Örnek Kodları

Outlook açılışına şifre koymak

(1/1)

Bülent Öztürk:
Outlook açılışına şifre koymak için aşağıdaki gibi bir yol izleyebiliriz;



ThisOutlookSession'a yazılacak kodlar:


--- Kod: ---Private Sub Application_Startup()
frmBulent_Giris.Show 1
MsgBox "İyi çalışmalar.", vbInformation, "Excelce.net/forum"
End Sub
--- Kod sonu ---

frmBulent_Giris isimli forma yazılacak kodlar:


--- Kod: ---Private Sub UserForm_Initialize()
TextBox1.SetFocus
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "Lütfen şifreyi giriniz...", vbCritical, "Outlook'u Açmak İçin Şifre Girmelisiniz"
End If
End Sub

Private Sub CommandButton1_Click()
Static bulent As Integer

If TextBox1 = "1234" Then
    Unload Me
Else
    ListBox1.AddItem TextBox1 & " başarısız deneme.":
    bulent = bulent + 1
    If bulent >= 3 Then
        ActiveWindow.Close
        Application.Quit
    End If
End If
End Sub
--- Kod sonu ---

Not:Form üzerinde 1 adet Textbox, 1 adet Listbox ve 1 Adet CommandButton olacak.

Navigasyon

[0] Mesajlar

Tam sürüme git