, . 10‑1, , , .
. 10‑1.
:
1. Insert/UserForm (. 10‑2).
. 10‑2.
(. 10‑3) (ControlslB):
. 10‑3.
(. 10‑4) ( Name frm) ( Caption ). . 10‑5.
. 10‑4. | . 10‑5 |
! , . , , . , . 1 .
1
TextBox | txt | txt | |
Label | lbl | lbl | |
CommandBar | cmd | cmd | |
ListBox | lst | lst | |
ComboBox | cbo | cbo | |
ScrollBar | scr | scr | |
SpinButton | spn | spn | |
OptionButton | opt | opt | |
CheckBox | chk | chk | |
ToggleButton | tgl | tgl | |
Frame | fra | fra | |
Image | img | img | |
MultiPage | mlt | mlt | |
TabStrip | tab | tab | |
UserForm | frm | frm |
2. , , . :
, ( , ). [Delete].
3. CommandButton (cmdOK), (), (Tahoma, 9 , ) [Enter] (. 10‑6). (. 10‑7):
. 10‑6. CommandButton | . 10‑7. |
4. , [Escape] ( Cancel True).
5. , . : , , - . , , [F4]. , .
|
|
:
, . . - - (, ) , / , .
. , , frm: , [Enter], [Escape]. (
Private SubUserForm_Click()),
Initialize, :
Private Sub UserForm_Initialize()
Caption = " "
cmdOK.Default = True
cmd.Cancel = True
End Sub
:
Sub ()
frm.Caption = " "
frm.cmdOK.Default = True
frm.cmd.Cancel = True
frm.Show
End Sub
!
6. , , . Private Sub cmdOK_Click()( )
7. :
Private Sub cmdOK_Click()
MsgBox " !", vbInfomation, _
" "
Unload Me
End Sub
8. :
Private Sub cmd_Click()
MsgBox " !", vbInfomation, _
" "
Unload Me
End Sub
.