CommandBeforeExecute Event

15 May

From:    “Sofyan Efendi” <sofyan@madinah.cc>
Date:    Wed, 16 Aug 2006 13:52:42 +0700

Event CommandBeforeExecute terjadi sebelum suatu command (perintah) dijalankan. Syntax:

Private Sub Form_CommandBeforeE xecute(ByVal Command As Variant, ByVal Cancel As Object)

Penjelasan:

– Command: Command (perintah) yang akan dijalankan.

– Cancel: Jika diisi True, maka command akan di cancel.

Contoh:

Private Sub Form_CommandBeforeE xecute( _
ByVal Command As Variant, ByVal Cancel As Object)
Dim intResponse As Integer
Dim strPrompt As String
strPrompt = “Cancel the command?”
intResponse = MsgBox(strPrompt, vbYesNo)
If intResponse = vbYes Then
Cancel.Value = True
Else
Cancel.Value = False
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: