Unload Event

14 May

From:    “Sofyan Efendi” <opi@softhome.net>
Date:    Wed, 23 Aug 2006 16:37:50 +0700

Event Unload terjadi setelah form tertutup, namun sebelum form tersebut benar-benar hilang dari screen. Syntax:

Private Sub Form_Unload( Cancel As Integer)

Penjelasan:

– Cancel: Jika diset True, maka akan mengcancel event ini, sehingga form menjadi tidak jadi di close.

Ketika kita menutup suatu form, maka urutan eventnya adalah sbb:

Unload -> Deactivate -> Close

Contoh:

Private Sub Form_Unload( Cancel As Integer)
If MsgBox(“Close form?”, vbYesNo) = vbYes Then
Exit Sub
Else
Cancel = True
End If
End Sub

Wassalaamu’alaikum Warahmatullahi Wabarakatuh,
Sofyan Efendi
– AccessWeb <http://www35.websamba.com/accessweb&gt;
– OPI-Homepage <http://www.geocities.com/opi1978&gt;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: