VBA ( ).
VBA.
:
Sub <_> ()
..................................
()
..................................
End Sub
Sub - , , , . Sub End Sub.
VBA.
, , . ; , . (. 19.22) .
. 19.22.
<> , , , . .
4 :
(), , ;
, ;
(, Excel, , ..);
, , VBA.
( ).
1.
2. () , ( )
3. ( Excel 5.0) ,
. , .
, . :
: Option Private Module
|
|
- , , .
, , .
:
Sub Proc_B (Val1 As Single; Val2 As Date;...)
( Windows ) .
, .. , Optional.
19.18.
Sub SquarPr (L As Single; H As Single; S As Single; Optional F) If IsMissing (F) Then F=100 S=L*H End Sub | SquarPr VBA IsMissing F, F , F 100 (F Variant) |
.
1-
Sub Proc_A () Dim Sq as Single SquarPr 12; 23; Sq End Sub | , Sq |
2- ,
Sub Proc_A () Dim Sq as Single Dim LL as Single Dim HH as Single LL=12 HH=23 SquarPr LL HH Sq End Sub | , Sq |
3-
Sub Proc_A () Dim Sq as Single Dim LL as Single Dim HH as Single LL=12 HH=23 SquarPr L:=LL; H:=HH; S:=Sq End Sub | , : |
, .
:
Static <var> As <type>
, ( ). . . , .
|
|
By Val , .