cobain begini:
1. waktu inisialisasi: masukin semua object form ke dictionary dengan key
"namaform" dan value "formobject"
2. akses object form lewat dictionary tsb
-bambang-
contoh:
'begin -------------------------------------------------
Option Explicit
' A collection of the forms to display.
Private FormInstances As Collection
' Save the forms in the FormInstances collection.
Private Sub Form_Load()
Set FormInstances = New Collection
FormInstances.Add frmPerson, "person"
FormInstances.Add frmPlace, "place"
FormInstances.Add frmThing, "thing"
End Sub
' Open the named form.
Private Sub cmdOpen_Click()
Dim frm As Form
' Trap the error if the form name is not in
' the collection.
On Error Resume Next
Set frm = FormInstances(LCase$(txtFormName.Text))
If Err.Number <> 0 Then
' There must not be a form with this name.
MsgBox "There is no form named '" & _
txtFormName.Text & "'"
Else
' Show the form.
frm.Show
End If
End Sub
' end -------------------------------------------------
--------------------------------------------------------------------------------
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3
Pengelola dapat dihubungi lewat [EMAIL PROTECTED]